$FreeBSD$ --- configure.orig 2011-07-04 22:15:01.000000000 +0100 +++ configure 2012-01-15 20:29:30.319674803 +0000 @@ -85,6 +85,8 @@ withcurses=no;; -no-shared-libs) withsharedlibs=no;; + -no-x11|--no-x11) + x11_wanted=no;; -x11include*|--x11include*) x11_include_dir=$2; shift;; -x11lib*|--x11lib*) @@ -521,7 +523,7 @@ mksharedlib="$flexlink" mkmaindll="$flexlink -maindll" shared_libraries_supported=true;; - *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*) + *-*-linux-gnu|*-*-linux|*-*-freebsd*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*) sharedcccompopts="-fPIC" mksharedlib="$bytecc -shared" bytecclinkopts="$bytecclinkopts -Wl,-E" @@ -636,6 +638,7 @@ i[345]86-*-netbsd*) natdynlink=true;; x86_64-*-netbsd*) natdynlink=true;; i386-*-gnu0.3) natdynlink=true;; + *-*-freebsd*) natdynlink=true;; esac fi @@ -687,6 +690,7 @@ hppa*-*-gnu*) arch=hppa; system=gnu;; powerpc*-*-linux*) arch=power; model=ppc; system=elf;; powerpc-*-netbsd*) arch=power; model=ppc; system=elf;; + powerpc-*-freebsd*) arch=power; model=ppc; system=bsd;; powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;; powerpc-*-darwin*) arch=power; system=rhapsody if $arch64; then model=ppc64; else model=ppc; fi;; @@ -796,6 +800,7 @@ i386,*,bsd_elf) profiling='prof';; amd64,*,macosx) profiling='prof';; i386,*,macosx) profiling='prof';; + *,*,freebsd) profiling='prof';; sparc,*,solaris) profiling='prof' case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;; @@ -1256,133 +1261,24 @@ x11_include="not found" x11_link="not found" -for dir in \ - $x11_include_dir \ - \ - /usr/X11R7/include \ - /usr/include/X11R7 \ - /usr/local/X11R7/include \ - /usr/local/include/X11R7 \ - /opt/X11R7/include \ - \ - /usr/X11R6/include \ - /usr/include/X11R6 \ - /usr/local/X11R6/include \ - /usr/local/include/X11R6 \ - /opt/X11R6/include \ - \ - /usr/X11/include \ - /usr/include/X11 \ - /usr/local/X11/include \ - /usr/local/include/X11 \ - /opt/X11/include \ - \ - /usr/X11R5/include \ - /usr/include/X11R5 \ - /usr/local/X11R5/include \ - /usr/local/include/X11R5 \ - /usr/local/x11r5/include \ - /opt/X11R5/include \ - \ - /usr/X11R4/include \ - /usr/include/X11R4 \ - /usr/local/X11R4/include \ - /usr/local/include/X11R4 \ - \ - /usr/X386/include \ - /usr/x386/include \ - /usr/XFree86/include/X11 \ - \ - /usr/include \ - /usr/local/include \ - /usr/unsupported/include \ - /usr/athena/include \ - /usr/lpp/Xamples/include \ - \ - /usr/openwin/include \ - /usr/openwin/share/include \ - ; \ -do - if test -f $dir/X11/X.h; then - x11_include=$dir - break - fi -done - -if test "$x11_include" = "not found"; then - x11_try_lib_dir='' -else - x11_try_lib_dir=`echo $x11_include | sed -e 's|include|lib|'` +if [ -n "$x11_include_dir" ]; then + x11_include="$x11_include_dir" fi -for dir in \ - $x11_lib_dir \ - $x11_try_lib_dir \ - \ - /usr/X11R6/lib64 \ - /usr/X11R6/lib \ - /usr/lib/X11R6 \ - /usr/local/X11R6/lib \ - /usr/local/lib/X11R6 \ - /opt/X11R6/lib \ - \ - /usr/X11/lib \ - /usr/lib/X11 \ - /usr/local/X11/lib \ - /usr/local/lib/X11 \ - /opt/X11/lib \ - \ - /usr/X11R5/lib \ - /usr/lib/X11R5 \ - /usr/local/X11R5/lib \ - /usr/local/lib/X11R5 \ - /usr/local/x11r5/lib \ - /opt/X11R5/lib \ - \ - /usr/X11R4/lib \ - /usr/lib/X11R4 \ - /usr/local/X11R4/lib \ - /usr/local/lib/X11R4 \ - \ - /usr/X386/lib \ - /usr/x386/lib \ - /usr/XFree86/lib/X11 \ - \ - /usr/lib64 \ - /usr/lib \ - /usr/local/lib \ - /usr/unsupported/lib \ - /usr/athena/lib \ - /usr/lpp/Xamples/lib \ - /lib/usr/lib/X11 \ - \ - /usr/openwin/lib \ - /usr/openwin/share/lib \ - ; \ -do - if test -f $dir/libX11.a || \ - test -f $dir/libX11.so || \ - test -f $dir/libX11.dll.a || \ - test -f $dir/libX11.dylib || \ - test -f $dir/libX11.sa; then - if test $dir = /usr/lib; then - x11_link="-lX11" - else - x11_libs="-L$dir" - case "$host" in - *-*-*bsd*) x11_link="-R$dir -L$dir -lX11";; - *) x11_link="-L$dir -lX11";; - esac - fi - break - fi -done - +if [ -n "$x11_lib_dir" ]; then + x11_link="-L$x11_lib_dir -lX11" + x11_libs="-L$x11_lib_dir" +fi if test "$x11_include" = "not found" || test "$x11_link" = "not found" then echo "X11 not found, the \"graph\" library will not be supported." x11_include="" +elif test "$x11_wanted" = "no" +then + echo "X11 support was disabled, the \"graph\" library will not be supported." + x11_include="" + x11_link="" else echo "Location of X11 include files: $x11_include/X11" echo "Options for linking with X11: $x11_link" @@ -1509,7 +1405,7 @@ then tk_libs="$tk_libs $dllib" elif sh ./hasgot $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs Tcl_DoOneEvent then - tk_libs="$tk_libs -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib" + tk_libs="$tk_libs -ltk$tkmaj$tkmin -ltcl$tclmaj.$tclmin $dllib" elif sh ./hasgot $tk_libs -ltcl$tclmaj$tclmin $tkauxlibs Tcl_DoOneEvent then tk_libs="$tk_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin $dllib"