summaryrefslogtreecommitdiff
path: root/ncftp
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-11-09 00:36:47 +0000
committerChris Larson <clarson@kergoth.com>2004-11-09 00:36:47 +0000
commitf96441b9faf769c9ecdd4d338b605ea3d0cc4010 (patch)
treeedb17ec2c4ea13c5acb1c7350957a249a820e28d /ncftp
parentb6588aa6851fb220cedc387d21c51513ef8d67f4 (diff)
Disable bk EOLN_NATIVE conversions on all files in packages FILESPATHs, to prevent it screwing up patches.
BKrev: 4190111fA4MuVozAqwE7xOSL9fr-TA
Diffstat (limited to 'ncftp')
-rw-r--r--ncftp/ncftp/acinclude.m44950
1 files changed, 4950 insertions, 0 deletions
diff --git a/ncftp/ncftp/acinclude.m4 b/ncftp/ncftp/acinclude.m4
index e69de29bb2..e7d4bd0602 100644
--- a/ncftp/ncftp/acinclude.m4
+++ b/ncftp/ncftp/acinclude.m4
@@ -0,0 +1,4950 @@
+AC_DEFUN([wi_ARG_WITH_SOCKS5], [
+ AC_ARG_WITH(socks5,[ --with-socks5 try to find and use the SOCKS5 library],wi_want_socks5=$withval,wi_want_socks5=no)
+])
+dnl
+dnl
+dnl
+dnl
+AH_TEMPLATE([SOCKS], [define if using the socks library])
+AC_DEFUN([wi_LIB_SOCKS5], [
+ if test "$wi_want_socks5" != yes ; then
+ ac_cv_lib_socks5_SOCKSinit=no
+ else
+ # Look for the "SOCKS" library for use with Firewalls/Gateways.
+ SOCKS_LIBS=''
+
+ # First check for extra libraries that may be needed to
+ # link against socks. If we already checked for one or
+ # more of these libraries, we don't want to count them
+ # in the socks-only list.
+ #
+ if test "x$ac_cv_lib_db_main" = "x" ; then
+ AC_CHECK_LIB(db,main,[SOCKS_LIBS="$SOCKS_LIBS -ldb"])
+ fi
+ if test "x$ac_cv_lib_isode_main" = "x" ; then
+ AC_CHECK_LIB(isode,main,[SOCKS_LIBS="$SOCKS_LIBS -lisode"])
+ fi
+ if test "x$ac_cv_lib_com_err_main" = "x" ; then
+ AC_CHECK_LIB(com_err,main,[SOCKS_LIBS="$SOCKS_LIBS -lcom_err"])
+ fi
+ if test "x$ac_cv_lib_crypto_main" = "x" ; then
+ AC_CHECK_LIB(crypto,main,[SOCKS_LIBS="$SOCKS_LIBS -lcrypto"])
+ fi
+ if test "x$ac_cv_lib_krb5_main" = "x" ; then
+ AC_CHECK_LIB(krb5,main,[SOCKS_LIBS="$SOCKS_LIBS -lkrb5"])
+ fi
+ if test "x$ac_cv_lib_gssapi_krb5_main" = "x" ; then
+ AC_CHECK_LIB(gssapi_krb5,main,[SOCKS_LIBS="$SOCKS_LIBS -lgssapi_krb5"])
+ fi
+
+ AC_CHECK_LIB(socks5,SOCKSinit,[SOCKS_LIBS="$SOCKS_LIBS -lsocks5"])
+ AC_CHECK_HEADERS(socks.h socks5p.h)
+
+ if test "$ac_cv_lib_socks5_SOCKSinit" != yes ; then
+ ac_cv_lib_socks5_SOCKSinit=no
+ unset SOCKS_LIBS
+ else
+ AC_SUBST(SOCKS_LIBS)
+ AC_DEFINE(SOCKS,5)
+ fi
+ fi
+ AC_MSG_CHECKING([if SOCKS5 will be used])
+ AC_MSG_RESULT([$ac_cv_lib_socks5_SOCKSinit])
+])
+dnl
+dnl
+dnl
+dnl
+AC_DEFUN([wi_ARG_ENABLE_DEBUG], [
+# if DEBUGBUILD is yes, other macros try to set up a compilation environment
+# with debugging symbols enabled. Example macros which are affected are
+# wi_CFLAGS and wi_SFLAG.
+#
+AC_ARG_ENABLE(debug,
+[ --enable-debug enable debugging symbols],
+[
+ DEBUGBUILD=no
+ DEBUGCONFIGUREFLAG=""
+ if test "$enableval" != "no" ; then
+ DEBUGBUILD=yes
+ DEBUGCONFIGUREFLAG="--enable-debug"
+ fi
+],[
+dnl # Argument not specified; default is disabled.
+ DEBUGBUILD=no
+ DEBUGCONFIGUREFLAG=""
+])
+])
+dnl
+dnl
+dnl
+dnl
+AC_DEFUN([wi_ARG_DISABLE_CCDV], [
+AC_ARG_ENABLE(ccdv,[ --disable-ccdv disable use of ccdv program in Makefiles],use_ccdv="$enableval",use_ccdv=yes)
+])
+dnl
+dnl
+dnl
+dnl
+AC_DEFUN([wi_ARG_DISABLE_PRECOMP], [
+AC_ARG_ENABLE(ccdv,[ --disable-precomp disable use of precompiled header files],use_precomp="$enableval",use_precomp=yes)
+])
+dnl
+dnl
+dnl
+dnl
+AH_TEMPLATE([PRAGMA_HDRSTOP], [])
+AC_DEFUN([wi_CC_PRECOMP], [
+AC_CACHE_CHECK([if the C compiler can use precompiled headers], [wi_cv_cc_precomp], [
+ result="no"
+ if test "${use_precomp-yes}" != no ; then
+ wi_cv_cc_precomp_type="unknown"
+ /bin/rm -f pchtest.h pchtest.p pchtest.c pchtest.o pchtest csetc.pch pchtest.pch pchtest.h.gch
+ cat <<EOF > pchtest.h
+/* pchtest.h */
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#define FOOBAR 33 /* Make sure it can compile custom headers too */
+EOF
+ cat <<EOF > pchtest.c
+/* pchtest.c */
+#include "pchtest.h"
+
+main()
+{
+ if (FOOBAR == 33)
+ exit(0);
+ exit(1);
+}
+EOF
+ if test "$GCC" = yes ; then
+ #
+ # Try gcc 3.4's built-in implementation first
+ #
+ echo ${CC-cc} $CPPFLAGS pchtest.h -c >&5
+ ${CC-cc} $CPPFLAGS pchtest.h -c >&5 2>&5
+ if test -f pchtest.h.gch ; then
+ #
+ # Good, the .gch file was created.
+ # Odds are we're good to go.
+ #
+ echo "Successfully compiled pchtest.h into the precompiled header file pchtest.h.gch." >&5
+ AC_TRY_COMPILE([#include "pchtest.h"],[if (FOOBAR == 33) exit(0)],[result="yes" ; wi_cv_cc_precomp_type="gcc_gch_files"],[result="no"])
+ else
+ echo "This version of GCC did not compile pchtest.h into the precompiled header file pchtest.h.gch." >&5
+ #
+ # See if Apple's implementation works.
+ #
+ echo ${CC-cc} $CPPFLAGS -precomp pchtest.h -o pchtest.p >&5
+ ${CC-cc} $CPPFLAGS -precomp pchtest.h -o pchtest.p >&5 2>&5
+ if test -s pchtest.p ; then
+ AC_TRY_COMPILE([#include "pchtest.h"],[if (FOOBAR == 33) exit(0)],[result="yes" ; wi_cv_cc_precomp_type="gcc_dash_precomp"],[result="no"])
+ fi
+ fi
+ elif test "${result}_${SYS-aix}_${GCC}" = "no_aix_no" ; then
+ #
+ # AIX xlc
+ #
+ echo ${CC-cc} $CPPFLAGS -qusepcomp -qgenpcomp pchtest.c -o pchtest >&5
+ ${CC-cc} $CPPFLAGS -qusepcomp -qgenpcomp pchtest.c -o pchtest >&5 2>&5
+ if test -s pchtest ; then
+ result="yes"
+ wi_cv_cc_precomp_type="xlc"
+ wi_CFLAGS_TO_ADD_LATER="$wi_CFLAGS_TO_ADD_LATER -qusepcomp -qgenpcomp"
+ fi
+ else
+ #
+ # IRIX, Compaq C
+ #
+ cat <<EOF > pchtest.c
+#include "pchtest.h"
+#pragma hdrstop
+#include <stdarg.h>
+
+main() { exit(0); }
+EOF
+ for pchflags in "-pch -no_pch_messages" "-pch" "-LANG:pch"
+ do
+ /bin/rm -f pchtest.pch
+ echo ${CC-cc} $CPPFLAGS $pchflags pchtest.c -o pchtest >&5
+ ${CC-cc} $CPPFLAGS $pchflags pchtest.c -o pchtest >&5 2>&5
+ if test -f pchtest.pch ; then
+ result="yes"
+ wi_cv_cc_precomp_type="ccc"
+ wi_CFLAGS_TO_ADD_LATER="$wi_CFLAGS_TO_ADD_LATER $pchflags"
+ AC_DEFINE(PRAGMA_HDRSTOP)
+ break
+ fi
+ done
+ unset pchflags
+ fi
+ /bin/rm -f pchtest.h pchtest.p pchtest.c pchtest.o pchtest csetc.pch pchtest.pch pchtest.h.gch
+ fi
+ wi_cv_cc_precomp="$result"
+])
+])
+dnl
+dnl
+dnl
+dnl
+AC_DEFUN([wi_TEST_DASH_L], [
+AC_CACHE_CHECK([if shell can test for symlinks], [wi_cv_shell_test_symlinks], [
+wi_cv_shell_test_symlinks="no"
+wi_cv_test_L="false"
+wi_cv_test_not_L=":"
+/bin/rm -f config.lnk
+if test ! -f "config.lnk" ; then
+ /bin/ln -s /bin/ln config.lnk
+ if test -f "config.lnk" ; then
+ ( if test -L config.lnk ; then /bin/rm -f config.lnk ; fi ) 2>/dev/null
+ if test ! -f "config.lnk" ; then
+ wi_cv_shell_test_symlinks="yes"
+ wi_cv_test_L='test -L'
+ wi_cv_test_not_L='test ! -L'
+ else
+ ( if test -h config.lnk ; then /bin/rm -f config.lnk ; fi ) 2>/dev/null
+ if test ! -f "config.lnk" ; then
+ wi_cv_shell_test_symlinks="yes"
+ wi_cv_test_L='test -h'
+ wi_cv_test_not_L='test ! -h'
+ fi
+ fi
+ fi
+ /bin/rm -f config.lnk
+fi
+])
+test_L="$wi_cv_test_L"
+test_not_L="$wi_cv_test_not_L"
+])
+dnl
+dnl
+dnl
+dnl
+AC_DEFUN([wi_EXTRA_IDIR], [
+incdir="$1"
+if test -r $incdir ; then
+ case "$CPPFLAGS" in
+ *${incdir}*)
+ # echo " + already had $incdir" 1>&6
+ ;;
+ *)
+ if test "$CPPFLAGS" = "" ; then
+ CPPFLAGS="-I$incdir"
+ else
+ CPPFLAGS="$CPPFLAGS -I$incdir"
+ fi
+ echo " + found $incdir" 1>&6
+ ;;
+ esac
+fi
+])
+dnl
+dnl
+dnl
+dnl
+AC_DEFUN([wi_EXTRA_LDIR], [
+libdir="$1"
+if test -r $libdir ; then
+ case "$LDFLAGS" in
+ *${libdir}*)
+ # echo " + already had $libdir" 1>&6
+ ;;
+ *)
+ if test "$LDFLAGS" = "" ; then
+ LDFLAGS="-L$libdir"
+ else
+ LDFLAGS="$LDFLAGS -L$libdir"
+ fi
+ echo " + found $libdir" 1>&6
+ ;;
+ esac
+fi
+])
+dnl
+dnl
+dnl
+dnl
+AC_DEFUN([wi_GNU_LD], [
+AC_MSG_CHECKING([for GNU ld])
+wi_cv_prog_ld="ld"
+result="no"
+x=`ld --version 2>/dev/null | fgrep GNU`
+if test "$x" != "" ; then
+ wi_cv_prog_ld="gld"
+ result="yes"
+fi
+AC_MSG_RESULT($result)
+])
+dnl
+dnl
+dnl
+dnl
+AC_DEFUN([wi_LD_READONLY_TEXT], [
+if test "$SYS$wi_cv_prog_ld" = "linuxgld" ; then
+ LDFLAGS="$LDFLAGS -Xlinker -n"
+fi
+])
+dnl
+dnl
+dnl
+dnl
+AC_DEFUN([wi_FUNC_STRSIGNAL], [
+ case "$OS" in
+ aix4.3*)
+ # It didn't appear until several ML packs
+ # into 4.3.3
+ #
+ ;;
+ *)
+ AC_CHECK_FUNCS(strsignal)
+ ;;
+ esac
+])
+dnl
+dnl
+dnl
+dnl
+AC_DEFUN([wi_FUNC_GETCWD], [
+if test "${SYS}" = sunos ; then
+ # Use getwd on SunOS -- getcwd does a "popen("/bin/pwd")" -- aaaccck.
+ #
+ AC_CHECK_FUNCS(getwd)
+else
+ AC_CHECK_FUNCS(getcwd getwd)
+fi
+if test "$ac_cv_func_getcwd" = no && test "$ac_cv_func_getwd" = no ; then
+AC_WARN(This system does not have either getwd or getcwd?)
+AC_WARN(I find that a little hard to believe.)
+AC_WARN(You may want to try -DHAVE_GETWD anyway.)
+AC_WARN([
+This could also mean that your compiler isn't working])
+AC_WARN(with this configure script. Check the ./config.log)
+AC_WARN(and look for anomalies.)
+fi
+])
+dnl
+dnl
+dnl
+dnl
+AC_DEFUN([wi_EXTRA_SYSV_SUNOS_DIRS], [
+if test "${SYS-sunos}" = sunos ; then
+ AC_MSG_CHECKING([for System V compatibility directories])
+ AC_MSG_RESULT([])
+ wi_EXTRA_IDIR("/usr/5include")
+ wi_EXTRA_LDIR("/usr/5lib")
+fi
+])
+dnl
+dnl
+dnl If you want to also look for include and lib subdirectories in the
+dnl $HOME tree, you supply "yes" as the first argument to this macro.
+dnl
+dnl If you want to look for subdirectories in include/lib directories,
+dnl you pass the names in argument 3, otherwise pass a dash.
+dnl
+AC_DEFUN([wi_EXTRA_DIRS], [
+AC_MSG_CHECKING([for extra include and lib directories])
+AC_MSG_RESULT([])
+ifelse([$1], yes, [dnl
+b1=`cd .. ; pwd`
+b2=`cd ../.. ; pwd`
+exdirs="$HOME $j $b1 $b2 $prefix $2"
+if test -x "$HOME/bin/OS" ; then
+ b3=`$HOME/bin/OS`
+ b3="$HOME/$b3"
+ if test -d "$b3" ; then
+ exdirs="$b3 $exdirs"
+ fi
+fi
+],[dnl
+exdirs="$prefix $2"
+])
+subexdirs="$3"
+if test "$subexdirs" = "" ; then
+ subexdirs="-"
+fi
+for subexdir in $subexdirs ; do
+if test "$subexdir" = "-" ; then
+ subexdir=""
+else
+ subexdir="/$subexdir"
+fi
+for exdir in $exdirs ; do
+ case "$exdir" in
+ "/usr"|"/"|"//")
+ if test "$exdir" = "//" ; then exdir="/" ; fi
+ if test "$subexdir" != ""; then
+ incdir="${exdir}/include${subexdir}"
+ wi_EXTRA_IDIR($incdir)
+
+ libdir="${exdir}/lib${subexdir}"
+ wi_EXTRA_LDIR($libdir)
+ fi
+ ;;
+ *)
+ if test "$subexdir" = ""; then
+ incdir="${exdir}/include${subexdir}"
+ wi_EXTRA_IDIR($incdir)
+
+ libdir="${exdir}/lib${subexdir}"
+ wi_EXTRA_LDIR($libdir)
+ fi
+ ;;
+ esac
+done
+done
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_HPUX_CFLAGS],
+[AC_MSG_CHECKING(if HP-UX ansi C compiler flags are needed)
+AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([wi_OS_VAR])
+ac_cv_hpux_flags=no
+if test "$os" = hp-ux ; then
+ if test "$GCC" = yes ; then
+ if test "$CFLAGS" != "" ; then
+ # Shouldn't be in there.
+changequote(<<, >>)dnl
+ CFLAGS=`echo "$CFLAGS" | sed 's/-A[ae]//g'`
+changequote([, ])dnl
+ case "$CFLAGS" in
+ *_HPUX_SOURCE*)
+ ;;
+ *)
+ # This is required for the extended
+ # namespace.
+ #
+ CFLAGS="-D_HPUX_SOURCE $CFLAGS"
+ ;;
+ esac
+ fi
+ else
+ # If you're not using gcc, then you better have a cc/c89
+ # that is usable. If you have the barebones compiler, it
+ # won't work. The good compiler uses -Aa for the ANSI
+ # compatible stuff.
+changequote(<<, >>)dnl
+ x=`echo "$CFLAGS" | grep 'A[ae]' 2>/dev/null`
+changequote([, ])dnl
+ if test "$x" = "" ; then
+ CFLAGS="$CFLAGS -Ae"
+ fi
+ fi
+ ac_cv_hpux_flags=yes
+fi
+AC_MSG_RESULT($ac_cv_hpux_flags)
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_OS_DEFAULT_CFLAGS], [
+AC_MSG_CHECKING(if we should customize your CFLAGS environment variable)
+wi_replace_O_with_g="no"
+case "$wi_orig_CFLAGS" in
+ "")
+ wi_replace_O_with_g="no"
+ ;;
+ "-g -O2")
+ wi_replace_O_with_g="no"
+ ;;
+ "-g -O")
+ wi_replace_O_with_g="no"
+ ;;
+ "-O2 -g")
+ wi_replace_O_with_g="no"
+ ;;
+ "-O -g")
+ wi_replace_O_with_g="no"
+ ;;
+ -g)
+ wi_replace_O_with_g="yes"
+ ;;
+esac
+
+#
+# See if your CFLAGS environment variable wasn't set or exported,
+# or if you are using a conservative default. If so, we will
+# add some additional flags for better performance, warning reporting,
+# etc.
+#
+# Note we are now checking the current value of CFLAGS, which may have
+# been changed by configure.
+#
+wi_os_default_cflags="no"
+case "$CFLAGS" in
+ "")
+ wi_os_default_cflags="yes"
+ ;;
+ "-g -O2")
+ wi_os_default_cflags="yes"
+ ;;
+ "-g -O")
+ wi_os_default_cflags="yes"
+ ;;
+ "-O2 -g")
+ wi_os_default_cflags="yes"
+ ;;
+ "-O -g")
+ wi_os_default_cflags="yes"
+ ;;
+ -g)
+ wi_os_default_cflags="yes"
+ ;;
+ -O)
+ wi_os_default_cflags="yes"
+ ;;
+ -O2)
+ wi_os_default_cflags="yes"
+ ;;
+esac
+
+if test "$wi_os_default_cflags" = yes ; then
+ if test "$GCC" = yes ; then
+ #
+ # gcc
+ #
+ wi_gcc_optimizer_flags=''
+ case "$wi_cv_gcc_version" in
+ 2.7.*|2.8.*|2.9*)
+ wi_os_default_cflags="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wbad-function-cast -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-declarations -Winline"
+ ;;
+ 3.*)
+ wi_os_default_cflags="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wbad-function-cast -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-declarations -Winline -Wmissing-format-attribute -Wformat-security"
+ wi_gcc_optimizer_flags='-Wdisabled-optimization'
+ ;;
+ *)
+ wi_os_default_cflags="-W -Wall"
+ ;;
+ esac
+ if test "$wi_replace_O_with_g" = yes ; then
+ wi_os_default_cflags="-g $wi_os_default_cflags"
+ else
+ wi_os_default_cflags="-O2 $wi_os_default_cflags"
+ if test "$wi_gcc_optimizer_flags" != "" ; then
+ wi_os_default_cflags="$wi_os_default_cflags $wi_gcc_optimizer_flags"
+ fi
+ fi
+ case "$OS" in
+ hpux*)
+ wi_os_default_cflags="-D_HPUX_SOURCE $wi_os_default_cflags"
+ ;;
+ bsdos*)
+ wi_os_default_cflags=`echo "$wi_os_default_cflags" | sed 's/\ -Wcast-qual//g'` # avoid va_start() problem
+ wi_os_default_cflags=`echo "$wi_os_default_cflags" | sed 's/\ -Wredundant-decls//g'`
+ ;;
+ openbsd*|unixware*|openunix*)
+ wi_os_default_cflags=`echo "$wi_os_default_cflags" | sed 's/\ -Wredundant-decls//g'`
+ ;;
+ esac
+ else
+ #
+ # regular cc
+ #
+ case "${wi_replace_O_with_g}_${OS}" in
+ no_aix*)
+ wi_os_default_cflags="-O -qinfo=cmp:cnd:dcl:eff:gen:ini:par:pro:rea:use -qlonglong -qro -qroconst -qlanglvl=extended -qsrcmsg -qmaxmem=20480 -qsuppress=1506-469:1506-409"
+ ;;
+ yes_aix*)
+ wi_os_default_cflags="-g -qinfo=cmp:cnd:dcl:eff:gen:ini:par:pro:rea:use -qlonglong -qro -qroconst -qlanglvl=extended -qsrcmsg -qmaxmem=20480 -qsuppress=1506-469:1506-409"
+ ;;
+ no_irix[2345]*|no_irix6.[01234]*)
+ wi_os_default_cflags="-O2 -xansi -fullwarn -use_readonly_const -G0 -rdata_shared"
+ ;;
+ yes_irix[2345]*|yes_irix6.[01234]*)
+ wi_os_default_cflags="-g -xansi -fullwarn -use_readonly_const -G0 -rdata_shared"
+ ;;
+ no_irix*)
+ wi_os_default_cflags="-O2 -IPA -xansi -fullwarn -use_readonly_const -G0 -rdata_shared -woff 1174"
+ ;;
+ yes_irix*)
+ wi_os_default_cflags="-g -xansi -fullwarn -use_readonly_const -G0 -rdata_shared -woff 1174"
+ ;;
+ no_digitalunix*)
+ wi_os_default_cflags="-O4 -std1 -portable -readonly_strings"
+ ;;
+ yes_digitalunix*)
+ wi_os_default_cflags="-g -std1 -portable -readonly_strings"
+ ;;
+ no_hpux*)
+ wi_os_default_cflags="-Ae +O2 +Ovolatile +Olibcalls +ESlit +w1 +DAportable"
+ ;;
+ yes_hpux*)
+ wi_os_default_cflags="-Ae -g +w1 +DAportable"
+ ;;
+ no_solaris*)
+ if test "$wi_cv_sunwspro_cc_version2" -ge 530 ; then
+ wi_os_default_cflags="-xipo -xO5 -xc99 -xbuiltin -xstrconst -dalign -Qn -errtags=yes -erroff=E_END_OF_LOOP_CODE_NOT_REACHED -mc"
+ else
+ wi_os_default_cflags="-xO4 -xstrconst -dalign -Qn"
+ fi
+ ;;
+ yes_solaris*)
+ if test "$wi_cv_sunwspro_cc_version2" -ge 530 ; then
+ wi_os_default_cflags="-g -xc99 -xstrconst -dalign -Qn -errtags=yes -erroff=E_END_OF_LOOP_CODE_NOT_REACHED"
+ else
+ wi_os_default_cflags="-g -xstrconst -dalign -Qn"
+ fi
+ ;;
+ no_tru64*)
+ wi_os_default_cflags="-O4 -tune host -std1 -readonly_strings -portable -warnprotos -msg_enable level6 -msg_disable longlongtype,hexoctunsign,unusedincl,unnecincl,nestincl,unusedtop,unknownmacro,ignorecallval,strctpadding,truncintasn,truncintcast,trunclongcast,ansialiascast,conststocls,unrefsdecl,subscrbounds2"
+ ;;
+ yes_tru64*)
+ wi_os_default_cflags="-g -std1 -readonly_strings -portable -warnprotos -msg_enable level6 -msg_disable longlongtype,hexoctunsign,unusedincl,unnecincl,nestincl,unusedtop,unknownmacro,ignorecallval,strctpadding,truncintasn,truncintcast,trunclongcast,ansialiascast,conststocls,unrefsdecl,subscrbounds2"
+ ;;
+ no_unixware*|no_openunix*)
+ wi_os_default_cflags='-O -K inline -K host -Q n'
+ ;;
+ yes_unixware*|yes_openunix*)
+ wi_os_default_cflags='-g -K host -Q n'
+ ;;
+ *)
+ wi_os_default_cflags="no"
+ ;;
+ esac
+ fi
+fi
+if test "$wi_os_default_cflags" != "no" ; then
+ CFLAGS="$wi_os_default_cflags"
+fi
+AC_MSG_RESULT($wi_os_default_cflags)
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_SFLAG], [AC_REQUIRE([AC_PROG_CC])
+STRIP="strip"
+if test "$SFLAG" = "" ; then
+ SFLAG="-s"
+ case "$OS" in
+ macosx*)
+ SFLAG='-Wl,-x'
+ ;;
+ esac
+fi
+#
+# Was it ./configure --enable-debug ?
+#
+if test "$DEBUGBUILD" = yes ; then
+ SFLAG=""
+ STRIP=":"
+fi
+case "$CFLAGS" in
+ "-g"|"-g "*|*" -g"|*" -g "*|*"-g"[0-9]*)
+ # SFLAG="# $SFLAG"
+ SFLAG=""
+ STRIP=":"
+ ;;
+esac
+STRIPFLAG="$SFLAG"
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_PROG_SUN_WORKSHOP_CC_VERSION], [
+AC_REQUIRE([AC_PROG_CC])
+if test "${SYS}_${GCC}" != solaris_no ; then
+ wi_cv_cc_is_sunwspro_cc="no"
+ wi_cv_sunwspro_cc_version="0"
+ wi_cv_sunwspro_cc_version2="0"
+else
+ AC_CACHE_CHECK([if the C compiler is Sun WorkShop C],[wi_cv_cc_is_sunwspro_cc], [
+changequote(<<, >>)dnl
+#
+# cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15
+# usage: cc [ options] files. Use 'cc -flags' for details
+#
+# cc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2
+# usage: cc [ options] files. Use 'cc -flags' for details
+#
+ wi_cv_sunwspro_cc_version=`$CC -V 2>&1 | sed -n '/WorkShop.*C\ [1-9]/{s/^.*C/C/;s/^C\ \([^\ ]*\).*/\1/;p;q;}'`
+ case "$wi_cv_sunwspro_cc_version" in
+ [1-9]*)
+ wi_cv_cc_is_sunwspro_cc="yes"
+ ver1=`echo "$wi_cv_sunwspro_cc_version" | cut -d. -f1`
+ ver2=`echo "$wi_cv_sunwspro_cc_version" | cut -d. -f2`
+ ver3=0
+ wi_cv_sunwspro_cc_version2=`expr "$ver1" '*' 100 + "$ver2" "*" 10 + "$ver3"`
+ unset ver1 ver2 ver3
+ ;;
+ *)
+ wi_cv_cc_is_sunwspro_cc="no"
+ wi_cv_sunwspro_cc_version="0"
+ wi_cv_sunwspro_cc_version2="0"
+ ;;
+ esac
+changequote([, ])dnl
+ ])
+ if test "$wi_cv_cc_is_sunwspro_cc" = yes ; then
+ AC_MSG_CHECKING([output of "cc -V" to determine version of Sun WorkShop C])
+ AC_MSG_RESULT("version $wi_cv_sunwspro_cc_version")
+ fi
+fi
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_PROG_GCC_VERSION], [
+AC_REQUIRE([AC_PROG_CC])
+if test "$GCC" = yes ; then
+ AC_CACHE_CHECK([the version of GCC],[wi_cv_gcc_version], [
+changequote(<<, >>)dnl
+ wi_cv_gcc_version=`$CC -v 2>&1 | sed -n '/gcc version/{s/^.*gcc version//;s/^[^1-9]*//;s/\ .*//;p;q;}'`
+changequote([, ])dnl
+])
+else
+ wi_cv_gcc_version="0"
+fi
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_REQUEST_NO_Y2K_WARNINGS], [
+ wi_request_no_y2k_warnings=yes
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_CFLAGS_NO_Y2K_WARNINGS], [
+AC_REQUIRE([AC_PROG_CC])
+if test "x$wi_request_no_y2k_warnings" = xyes ; then
+case "${wi_cv_gcc_version-0}" in
+changequote(<<, >>)dnl
+ 0|1.*|2.[012345678].*)
+changequote([, ])dnl
+ ;;
+ *)
+ case "$CFLAGS" in
+ *-Wno-format-y2k*)
+ ;;
+ *)
+ oldCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wno-format-y2k"
+ #
+ # Now check if this version of GCC
+ # accepts this flag...
+ #
+ AC_TRY_COMPILE([],[int junk;],[],[CFLAGS="$oldCFLAGS"])
+ unset oldCFLAGS
+ ;;
+ esac
+ ;;
+esac
+fi
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_CFLAGS], [AC_REQUIRE([AC_PROG_CC])
+ wi_PROG_GCC_VERSION
+ AC_REQUIRE_CPP()
+ wi_PROG_SUN_WORKSHOP_CC_VERSION
+ wi_OS_DEFAULT_CFLAGS
+ wi_CFLAGS_NO_Y2K_WARNINGS
+changequote(<<, >>)dnl
+ add_O0="no"
+ if [ "$NOOPTCFLAGS" = "" ] ; then
+ NOOPTCFLAGS=`echo "$CFLAGS" | sed 's/[-+]O[0-9A-Za-z]*//g;s/-xO[0-9]//g;s/-Wc,-O3//g;s/-IPA//g;s/-xipo//g;s/\ \ */ /g;s/^\ *//;s/\ *$//;'`
+ if [ "$GCC" = "yes" ] ; then
+ add_O0="yes"
+ else
+ case "$CC" in
+ ccc|*/ccc)
+ # Compaq CC
+ add_O0="yes"
+ ;;
+ esac
+ fi
+ fi
+ if [ "$DEBUGCFLAGS" = "" ] ; then
+ DEBUGCFLAGS="-g $NOOPTCFLAGS"
+ fi
+ if [ "$add_O0" = yes ] ; then
+ NOOPTCFLAGS="-O0 $NOOPTCFLAGS"
+ fi
+changequote([, ])dnl
+ #
+ # Was it ./configure --enable-debug ?
+ #
+ AC_MSG_CHECKING([if this is a debug build])
+ if test "$DEBUGBUILD" = yes ; then
+ AC_MSG_RESULT(yes)
+ CFLAGS="$DEBUGCFLAGS"
+ else
+ AC_MSG_RESULT(no)
+ fi
+ AC_MSG_CHECKING([NOOPTCFLAGS])
+ AC_MSG_RESULT($NOOPTCFLAGS)
+ AC_MSG_CHECKING([DEBUGCFLAGS])
+ AC_MSG_RESULT($DEBUGCFLAGS)
+ AC_MSG_CHECKING([CFLAGS])
+ AC_MSG_RESULT($CFLAGS)
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_HPUX_GCC___STDC_EXT__], [
+AC_MSG_CHECKING([if -D__STDC_EXT__ is needed with GCC on HP-UX])
+AC_TRY_RUN([
+#include <stdio.h>
+
+main()
+{
+#ifdef __STDC_EXT__
+ if (__STDC_EXT__ == 0)
+ exit(1); /* have __STDC_EXT__=0 */
+ exit(0); /* have __STDC_EXT__=1 */
+#else
+ exit(1); /* do not have __STDC_EXT__ */
+#endif
+}],[
+ # action if true
+ #
+ # Already have it defined.
+ #
+ AC_MSG_RESULT(no)
+],[
+ # action if false
+ #
+ # Not defined -- we need to define it then.
+ # This is required for the extended
+ # namespace symbols for Large Files.
+ #
+ CFLAGS="-D__STDC_EXT__ $CFLAGS"
+ AC_MSG_RESULT(yes)
+],[
+ # action if cross-compiling, guess
+ CFLAGS="-D__STDC_EXT__ $CFLAGS"
+ AC_MSG_RESULT(yes)
+])
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_ENV_VAR_MESSAGES], [
+AC_MSG_CHECKING([if you set and exported the environment variable CC])
+if test "x$CC" = x ; then
+ AC_MSG_RESULT([no (you may want to do that since configure scripts look for gcc first)])
+else
+ AC_MSG_RESULT($CC)
+fi
+AC_MSG_CHECKING([for environment variable CFLAGS])
+if test "x$CFLAGS" = x ; then
+ AC_MSG_RESULT([no (we will choose a default set for you)])
+else
+ AC_MSG_RESULT($CFLAGS)
+fi
+AC_MSG_CHECKING([for environment variable CPPFLAGS])
+AC_MSG_RESULT(${CPPFLAGS-no})
+AC_MSG_CHECKING([for environment variable LDFLAGS])
+AC_MSG_RESULT(${LDFLAGS-no})
+AC_MSG_CHECKING([for environment variable LIBS])
+AC_MSG_RESULT(${LIBS-no})
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_CFLAGS_LFS64], [AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([wi_OS_VAR])
+wi_CFLAGS
+if test "os_${os}_gcc_${GCC}" = os_hp-ux_gcc_yes ; then
+ wi_HPUX_GCC___STDC_EXT__
+fi
+case "$CFLAGS" in
+ *-D_LARGEFILE64_SOURCE*)
+ ;;
+ *)
+ CFLAGS="-D_LARGEFILE64_SOURCE $CFLAGS"
+ DEBUGCFLAGS="-D_LARGEFILE64_SOURCE $DEBUGCFLAGS"
+ NOOPTCFLAGS="-D_LARGEFILE64_SOURCE $NOOPTCFLAGS"
+ ;;
+esac
+AC_MSG_CHECKING([if we should add to CFLAGS for LFS64 support])
+AC_MSG_RESULT($CFLAGS)
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_CFLAGS_REENTRANT], [AC_REQUIRE([AC_PROG_CC])
+case "$CFLAGS" in
+ *-D_REENTRANT*)
+ ;;
+ *)
+ CFLAGS="-D_REENTRANT $CFLAGS"
+ ;;
+esac
+AC_MSG_CHECKING([if we should add -D_REENTRANT to CFLAGS])
+AC_MSG_RESULT($CFLAGS)
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_PROTOTYPES], [
+AC_MSG_CHECKING(if the compiler supports function prototypes)
+AC_TRY_COMPILE(,[extern void exit(int status);],[wi_cv_prototypes=yes
+AC_DEFINE(PROTOTYPES)],wi_cv_prototypes=no)
+AC_MSG_RESULT($wi_cv_prototypes)
+])
+dnl
+dnl
+dnl
+
+AH_TEMPLATE([tv_sec_t], [type of the tv_sec field of struct timeval])
+AH_TEMPLATE([tv_usec_t], [type of the tv_usec field of struct timeval])
+AC_DEFUN([wi_STRUCT_TIMEVAL_FIELD_TYPES], [
+wi_struct_timeval_field_checks="cached"
+AC_CACHE_CHECK([what type the tv_sec field of struct timeval is],[wi_cv_struct_timeval_tv_sec], [
+wi_struct_timeval_field_checks="uncached"
+wi_PREREQ_UNISTD_H([$0])
+AC_TRY_RUN([
+ /* program */
+#if defined(AIX) || defined(_AIX) || defined(__HOS_AIX__)
+# define _ALL_SOURCE 1
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+static void
+neg(void *dst0, size_t siz)
+{
+ unsigned char *dst = (unsigned char *) dst0;
+ unsigned char *dlim;
+
+ dlim = dst + siz;
+ while (dst < dlim)
+ *dst++ = (unsigned char) 0xEE;
+}
+
+int
+main(int argc, char **argv)
+{
+ FILE *fp;
+ const char *typ;
+ struct timeval tv;
+#define x tv.tv_sec
+
+ memset(&tv, 0, sizeof(tv));
+ fp = stdout;
+ if (argc == 1) {
+ fp = fopen("conftest.out", "w");
+ if (fp == NULL) {
+ perror("could not write to ./conftest.out");
+ exit(1);
+ }
+ }
+
+ neg(&x, sizeof(x));
+#ifdef HAVE_LONG_LONG
+ if (sizeof(x) == sizeof(long long)) {
+ typ = "long long";
+ } else
+#endif
+ if (sizeof(x) == sizeof(long)) {
+ typ = "long";
+ } else {
+ typ = "int";
+ }
+ (void) fprintf(fp, "%s%s\n", (x > 0) ? "unsigned " : "", typ);
+#undef x
+
+#define x tv.tv_usec
+ neg(&x, sizeof(x));
+#ifdef HAVE_LONG_LONG
+ if (sizeof(x) == sizeof(long long)) {
+ typ = "long long";
+ } else
+#endif
+ if (sizeof(x) == sizeof(long)) {
+ typ = "long";
+ } else {
+ typ = "int";
+ }
+ (void) fprintf(fp, "%s%s\n", (x > 0) ? "unsigned " : "", typ);
+#undef x
+
+ if (fp != stdout)
+ (void) fclose(fp);
+ exit(0);
+}
+],[
+ # action if true
+ if test -f conftest.out ; then
+ wi_cv_struct_timeval_tv_sec="`sed -n '1,1p' conftest.out`"
+ wi_cv_struct_timeval_tv_usec="`sed -n '2,2p' conftest.out`"
+ fi
+],[
+ # action if false
+ wi_cv_struct_timeval_tv_sec="long"
+ wi_cv_struct_timeval_tv_usec="long"
+],[
+ # action if cross compiling
+ wi_cv_struct_timeval_tv_sec="long"
+ wi_cv_struct_timeval_tv_usec="long"
+])
+ /bin/rm -f conftest.out
+])
+if test "$wi_struct_timeval_field_checks" = "uncached" ; then
+ AC_MSG_CHECKING([what type the tv_usec field of struct timeval is])
+ AC_MSG_RESULT([$wi_cv_struct_timeval_tv_usec])
+else
+ AC_CACHE_CHECK([what type the tv_usec field of struct timeval is],[wi_cv_struct_timeval_tv_usec], [:])
+fi
+AC_DEFINE_UNQUOTED(tv_sec_t, $wi_cv_struct_timeval_tv_sec)
+AC_DEFINE_UNQUOTED(tv_usec_t, $wi_cv_struct_timeval_tv_usec)
+])
+dnl
+dnl
+dnl
+AH_TEMPLATE([main_void_return_t], [type that main() should return])
+AC_DEFUN([wi_VOID_MAIN_RETURN_TYPE], [
+AC_CACHE_CHECK([what type main() should return],[wi_cv_main_void_return_t], [
+wi_cv_main_void_return_t="int"
+case "${GCC}_${SYS}" in
+ no_irix*|no_hpux)
+ wi_cv_main_void_return_t="void"
+ ;;
+esac
+])
+AC_DEFINE_UNQUOTED(main_void_return_t, $wi_cv_main_void_return_t)
+])
+dnl
+dnl
+dnl
+AH_TEMPLATE([INSECURE_CHOWN], [define if chown can be used to subvert security])
+AC_DEFUN([wi_INSECURE_CHOWN], [
+wi_PREREQ_UNISTD_H([$0])
+AC_MSG_CHECKING(if chown can be used to subvert security)
+AC_TRY_RUN([
+#if defined(AIX) || defined(_AIX) || defined(__HOS_AIX__)
+# define _ALL_SOURCE 1
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+
+main()
+{
+ int result;
+ char fn[64];
+ FILE *fp;
+ struct stat st;
+
+ setuid(1); /* if you're root, try set to someone else. */
+ sprintf(fn, "/tmp/fu%06ld", (long) getpid());
+ unlink(fn);
+ fp = fopen(fn, "w");
+ if (fp == NULL)
+ exit(1); /* assume the worst */
+ fprintf(fp, "%s\n", "hello world");
+ fclose(fp);
+
+ result = chown(fn, 0, 0);
+ if (stat(fn, &st) < 0) {
+ unlink(fn);
+ exit((result == 0) ? 0 : 1);
+ }
+ unlink(fn);
+
+ /* exit(0) if the insecure chown to uid 0 succeeded. */
+ exit((st.st_uid == 0) ? 0 : 1);
+}],[
+ # action if true
+ wi_cv_insecure_chown=yes
+ AC_DEFINE(INSECURE_CHOWN)
+],[
+ # action if false
+ wi_cv_insecure_chown=no
+],[
+ # action if cross-compiling, guess
+ wi_cv_insecure_chown=no
+])
+
+AC_MSG_RESULT($wi_cv_insecure_chown)
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_PREREQ_UNISTD_H], [
+ if test "x$ac_cv_header_unistd_h" = x ; then
+ AC_MSG_ERROR([Script needs to check for <unistd.h> before calling [$1].])
+ fi
+])
+
+AH_TEMPLATE([NEED_GETOPT_H], [define if we need to include <getopt.h> for the getopt() global variables])
+AH_TEMPLATE([NEED_GETOPT_EXTERN_DECLS], [define if we need extern declarations for the getopt() global variables])
+AC_DEFUN([wi_GETOPT], [
+AC_CACHE_CHECK([how to access getopt() global variables], [wi_cv_getopt_decl], [
+wi_PREREQ_UNISTD_H([$0])
+AC_TRY_COMPILE([
+/* includes */
+#if defined(AIX) || defined(_AIX) || defined(__HOS_AIX__)
+# define _ALL_SOURCE 1
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+],[
+ optind = (optarg == 0) ? 66 : 99;
+],[wi_cv_getopt_decl="automatic"],[wi_cv_getopt_decl="unknown"])
+if test "$wi_cv_getopt_decl" = unknown ; then
+AC_TRY_COMPILE([
+/* includes */
+#if defined(AIX) || defined(_AIX) || defined(__HOS_AIX__)
+# define _ALL_SOURCE 1
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <getopt.h>
+],[
+ optind = (optarg == 0) ? 66 : 99;
+],[wi_cv_getopt_decl="getopt.h"],[wi_cv_getopt_decl="manual"])
+fi
+])
+if test "$wi_cv_getopt_decl" = "getopt.h" ; then
+ AC_DEFINE(NEED_GETOPT_H)
+elif test "$wi_cv_getopt_decl" = "manual" ; then
+ AC_DEFINE(NEED_GETOPT_EXTERN_DECLS)
+fi
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_LIB_SNPRINTF], [
+if test "$ac_cv_func_snprintf" = "no" ; then
+ AC_CHECK_LIB(snprintf,snprintf)
+ if test "$ac_cv_lib_snprintf_snprintf" = yes ; then
+ unset ac_cv_func_snprintf ac_cv_func_vsnprintf
+ AC_CHECK_HEADERS(snprintf.h)
+ AC_CHECK_FUNCS(snprintf vsnprintf)
+ fi
+fi
+])
+dnl
+dnl
+dnl
+AH_TEMPLATE([SNPRINTF_TERMINATES], [define if snprintf works correctly])
+AC_DEFUN([wi_SNPRINTF_TERMINATES], [
+if test "$ac_cv_func_snprintf" != "no" ; then
+AC_MSG_CHECKING(if snprintf works correctly)
+ if test "$ac_cv_func_snprintf" = "no" ; then
+ AC_CHECK_LIB(snprintf,snprintf)
+ fi
+wi_PREREQ_UNISTD_H([$0])
+AC_TRY_RUN([
+ /* program */
+#if defined(AIX) || defined(_AIX) || defined(__HOS_AIX__)
+# define _ALL_SOURCE 1
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#include <stdlib.h>
+
+main()
+{
+ char s[16];
+ int i, result;
+
+ for (i=0; i<(int)(sizeof(s)/sizeof(char)); i++)
+ s[i] = 'x';
+ result = (int) snprintf(s + 1, 10, "%s %s!", "hello", "world");
+ if (s[10] != '\0')
+ exit(1); /* did not force termination! */
+ if (s[11] != 'x')
+ exit(2); /* overflow! */
+ if (s[0] != 'x')
+ exit(3); /* underflow! */
+ exit(0);
+}
+],[
+ # action if true
+ wi_cv_snprintf_terminates=yes
+ AC_DEFINE(SNPRINTF_TERMINATES)
+ x="yes";
+],[
+ # action if false
+ wi_cv_snprintf_terminates=no
+ x="no";
+],[
+ # action if cross compiling
+ wi_cv_snprintf_terminates=no
+ x="unknown";
+])
+AC_MSG_RESULT($x)
+fi
+])
+dnl
+dnl
+dnl
+AC_DEFUN([wi_SNPRINTF], [
+wi_SPRINTF_RETVAL
+dnl Uncache these -- config.cache doesn't cache it right for this case.
+unset ac_cv_func_snprintf
+unset ac_cv_func_vsnprintf
+
+AC_CHECK_FUNCS(snprintf vsnprintf)
+wi_SNPRINTF_TERMINATES
+wi_LIB_SNPRINTF
+])
+dnl
+dnl
+dnl
+
+AH_TEMPLATE([HAVE_HPSECURITY_H], [define if we have hpsecurity.h])
+AC_DEFUN([wi_HEADER_HPSECURITY_H], [
+AC_MSG_CHECKING(for hpsecurity.h)
+wi_cv_header_hpsecurity_h=no
+if test -f /usr/include/hpsecurity.h ; then
+ wi_cv_header_hpsecurity_h=yes
+ AC_DEFINE(HAVE_HPSECURITY_H)
+fi
+AC_MSG_RESULT($wi_cv_header_hpsecurity_h)
+])
+dnl
+dnl
+dnl
+AH_TEMPLATE([CAN_USE_SYS_SELECT_H]