diff --git a/nufxlib-0/configure b/nufxlib-0/configure index fe85df7..3699266 100755 --- a/nufxlib-0/configure +++ b/nufxlib-0/configure @@ -1655,6 +1655,14 @@ EOF fi echo "$ac_t""$nufxlib_cv_vsnprintf_in_header" 1>&6 +if test -z "$GCC"; then + BUILD_FLAGS='$(OPT)' +else + BUILD_FLAGS='$(OPT) $(GCC_FLAGS)' +fi + + + SHARE_FLAGS='-shared' if test "$host_cpu" = "powerpc" -a "$host_os" = "beos"; then CC=cc @@ -1666,16 +1674,14 @@ elif test "$host_os" = "beos"; then SHARE_FLAGS='-nostartfiles -Xlinker -soname="$@"' fi -if test -z "$GCC"; then - BUILD_FLAGS='$(OPT)' -else - BUILD_FLAGS='$(OPT) $(GCC_FLAGS)' +if test "$host_vendor" = "apple" -a ${host_os:0:6} = "darwin"; then + echo "checking for Mac OS X... yes, adding -framework Carbon" + LIBS="$LIBS -framework Carbon" fi - if test "$host_os" = "beos"; then if test "$prefix" = "NONE" -a \ "$includedir" = '${prefix}/include' -a \ @@ -1697,8 +1703,10 @@ if test "$host_os" = "beos"; then fi fi + + echo $ac_n "checking if sprintf returns int""... $ac_c" 1>&6 -echo "configure:1702: checking if sprintf returns int" >&5 +echo "configure:1710: checking if sprintf returns int" >&5 if eval "test \"`echo '$''{'nufxlib_cv_sprintf_returns_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1707,7 +1715,7 @@ else nufxlib_cv_sprintf_returns_int=no else cat > conftest.$ac_ext < @@ -1720,7 +1728,7 @@ else } EOF -if { (eval echo configure:1724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then nufxlib_cv_sprintf_returns_int=yes else @@ -1799,7 +1807,7 @@ fi if test $enable_deflate = "yes"; then echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 -echo "configure:1803: checking for deflate in -lz" >&5 +echo "configure:1811: checking for deflate in -lz" >&5 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1807,7 +1815,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1835,17 +1843,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for zlib.h""... $ac_c" 1>&6 -echo "configure:1839: checking for zlib.h" >&5 +echo "configure:1847: checking for zlib.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1885,7 +1893,7 @@ fi if test $enable_bzip2 = "yes"; then echo $ac_n "checking for BZ2_bzCompress in -lbz2""... $ac_c" 1>&6 -echo "configure:1889: checking for BZ2_bzCompress in -lbz2" >&5 +echo "configure:1897: checking for BZ2_bzCompress in -lbz2" >&5 ac_lib_var=`echo bz2'_'BZ2_bzCompress | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1893,7 +1901,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbz2 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1921,17 +1929,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "bzlib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for bzlib.h""... $ac_c" 1>&6 -echo "configure:1925: checking for bzlib.h" >&5 +echo "configure:1933: checking for bzlib.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* diff --git a/nufxlib-0/configure.in b/nufxlib-0/configure.in index c0bf4b5..4b0356f 100644 --- a/nufxlib-0/configure.in +++ b/nufxlib-0/configure.in @@ -62,7 +62,26 @@ if test $nufxlib_cv_vsnprintf_in_header = "yes"; then fi AC_MSG_RESULT($nufxlib_cv_vsnprintf_in_header) -dnl Figure out what the build and link flags should be +dnl if we're using gcc, include gcc-specific warning flags +if test -z "$GCC"; then + BUILD_FLAGS='$(OPT)' +else + BUILD_FLAGS='$(OPT) $(GCC_FLAGS)' +fi + + +dnl --------------------------------------------------------------------------- +dnl Some host-specific stuff. Variables you can test (set by the +dnl AC_CANONICAL_HOST call earlier) look like this: +dnl +dnl $host = i686-pc-linux-gnu +dnl $host_cpu = i686 +dnl $host_vendor = pc +dnl $host_os = linux-gnu + +dnl Figure out what the build and link flags should be; different for BeOS. +dnl (Should really use the auto-shared-lib stuff, but that adds a whole +dnl bunch of stuff.) SHARE_FLAGS='-shared' if test "$host_cpu" = "powerpc" -a "$host_os" = "beos"; then dnl BeOS/PPC, with Metrowerks compiler @@ -76,17 +95,15 @@ elif test "$host_os" = "beos"; then SHARE_FLAGS='-nostartfiles -Xlinker -soname="$@"' fi -dnl if we're using gcc, include gcc-specific warning flags -if test -z "$GCC"; then - BUILD_FLAGS='$(OPT)' -else - BUILD_FLAGS='$(OPT) $(GCC_FLAGS)' +dnl Mac OS X (powerpc-apple-darwin6.6) needs an extra flag. +if test "$host_vendor" = "apple" -a ${host_os:0:6} = "darwin"; then + echo "checking for Mac OS X... yes, adding -framework Carbon" + LIBS="$LIBS -framework Carbon" fi AC_SUBST(BUILD_FLAGS) AC_SUBST(SHARE_FLAGS) - dnl BeOS doesn't like /usr/local/include, and gets feisty about it. If libdir dnl and includedir are set to defaults, replace them with BeOS values. This dnl might be going a little too far... @@ -111,6 +128,8 @@ if test "$host_os" = "beos"; then fi fi + + dnl Test to see if sprintf does something reasonable. I'm going to assume dnl that vsprintf and (if available) vsnprintf return the same thing. AC_MSG_CHECKING(if sprintf returns int) diff --git a/nulib2/configure b/nulib2/configure index 569b2de..974229b 100755 --- a/nulib2/configure +++ b/nulib2/configure @@ -1823,6 +1823,13 @@ fi done +if test -z "$GCC"; then + BUILD_FLAGS='$(OPT)' +else + BUILD_FLAGS='$(OPT) $(GCC_FLAGS)' +fi + + if test "$host_os" = "beos"; then if test "$prefix" = "NONE" -a \ "$includedir" = '${prefix}/include' -a \ @@ -1844,6 +1851,11 @@ if test "$host_os" = "beos"; then fi fi +if test "$host_vendor" = "apple" -a ${host_os:0:7} = "darwin6"; then + echo "checking for Mac OS X... yes, adding -framework Carbon" + LIBS="$LIBS -framework Carbon" +fi + if test "$host_cpu" = "powerpc" -a "$host_os" = "beos"; then CC=cc @@ -1852,12 +1864,6 @@ if test "$host_cpu" = "powerpc" -a "$host_os" = "beos"; then echo "forcing CC to \"$CC\" and CFLAGS to \"$CFLAGS\"" fi -if test -z "$GCC"; then - BUILD_FLAGS='$(OPT)' -else - BUILD_FLAGS='$(OPT) $(GCC_FLAGS)' -fi - # Check whether --enable-dmalloc or --disable-dmalloc was given. diff --git a/nulib2/configure.in b/nulib2/configure.in index d04089e..4a16143 100644 --- a/nulib2/configure.in +++ b/nulib2/configure.in @@ -67,6 +67,22 @@ dnl AC_FUNC_SETVBUF_REVERSED AC_FUNC_UTIME_NULL AC_CHECK_FUNCS(memmove mkdir strtoul strcasecmp strncasecmp strerror) +dnl if we're using gcc, include gcc-specific warning flags +if test -z "$GCC"; then + BUILD_FLAGS='$(OPT)' +else + BUILD_FLAGS='$(OPT) $(GCC_FLAGS)' +fi + +dnl --------------------------------------------------------------------------- +dnl Some host-specific stuff. Variables you can test (set by the +dnl AC_CANONICAL_HOST call earlier) look like this: +dnl +dnl $host = i686-pc-linux-gnu +dnl $host_cpu = i686 +dnl $host_vendor = pc +dnl $host_os = linux-gnu + dnl BeOS doesn't like /usr/local/include, and gets feisty about it. If libdir dnl and includedir are set to defaults, replace them with BeOS values. This dnl might be going a little too far... @@ -91,6 +107,12 @@ if test "$host_os" = "beos"; then fi fi +dnl Mac OS X (powerpc-apple-darwin6.6) needs an extra flag. +if test "$host_vendor" = "apple" -a ${host_os:0:6} = "darwin"; then + echo "checking for Mac OS X... yes, adding -framework Carbon" + LIBS="$LIBS -framework Carbon" +fi + dnl Figure out what the build and link flags should be if test "$host_cpu" = "powerpc" -a "$host_os" = "beos"; then @@ -101,14 +123,6 @@ if test "$host_cpu" = "powerpc" -a "$host_os" = "beos"; then echo "forcing CC to \"$CC\" and CFLAGS to \"$CFLAGS\"" fi -dnl if we're using gcc, include gcc-specific warning flags -dnl ( -if test -z "$GCC"; then - BUILD_FLAGS='$(OPT)' -else - BUILD_FLAGS='$(OPT) $(GCC_FLAGS)' -fi - AC_SUBST(BUILD_FLAGS) AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc do dmalloc stuff], \