summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-10-15 02:38:17 +0100
committerMans Rullgard <mans@mansr.com>2012-10-23 12:01:18 +0100
commit4ebc6a74108f6c0448249b398ef33b25f3b16c0c (patch)
tree192b17707146db4caf896724cf89897de89a539b /configure
parent80521c1997a23e148edf89e11b939ab8646297ca (diff)
build: Plan 9 support
This adds support for building on Plan 9 x86-32. The compat/plan9 directory contains these items: - replacements for the 'head' and 'printf' shell commands - wrapper for main() to disable FPU exceptions Larger required changes to the system are described in the documentation. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure22
1 files changed, 21 insertions, 1 deletions
diff --git a/configure b/configure
index f597cafe99..37cdf1e096 100755
--- a/configure
+++ b/configure
@@ -956,7 +956,7 @@ apply(){
cp_if_changed(){
cmp -s "$1" "$2" && echo "$2 is unchanged" && return
mkdir -p "$(dirname $2)"
- cp -f "$1" "$2"
+ $cp_f "$1" "$2"
}
# CONFIG_LIST contains configurable options, while HAVE_LIST is for
@@ -1753,6 +1753,7 @@ shlibdir_default="$libdir_default"
ar_default="ar"
cc_default="gcc"
host_cc_default="gcc"
+cp_f="cp -f"
ln_s="ln -sf"
nm_default="nm -g"
objformat="elf"
@@ -2879,6 +2880,19 @@ case $target_os in
;;
minix)
;;
+ plan9)
+ add_cppflags -D_C99_SNPRINTF_EXTENSION \
+ -D_REENTRANT_SOURCE \
+ -D_RESEARCH_SOURCE \
+ -DFD_SETSIZE=96 \
+ -DHAVE_SOCK_OPTS
+ add_compat strtod.o strtod=avpriv_strtod
+ network_extralibs='-lbsd'
+ exeobjs=compat/plan9/main.o
+ disable avserver
+ ln_s='ln -s -f'
+ cp_f='cp'
+ ;;
none)
;;
*)
@@ -3531,6 +3545,12 @@ elif enabled msvc; then
enabled x86_32 && disable aligned_stack
fi
+case $target_os in
+ plan9)
+ add_cppflags -Dmain=plan9_main
+ ;;
+esac
+
enabled_any $THREADS_LIST && enable threads
enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; }