]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Require autoconf 2.61 as a minimum, and eliminate stuff that does for you.
authorGuy Harris <[email protected]>
Sun, 12 May 2013 19:35:43 +0000 (12:35 -0700)
committerGuy Harris <[email protected]>
Sun, 12 May 2013 19:35:43 +0000 (12:35 -0700)
autoconf 2.61 and later do, in AC_PROG_CC, tests to figure out how to
beat non-GCC compilers into doing the closest thing to ANSI C of which
they're capable, so we don't need to do them ourselves.

aclocal.m4
config.h.in
configure
configure.in

index 34e03fce66287f16984ecea37d4337b328490862..558eb6bc4b8ec87fd6320bdb0eefc5065290569d 100644 (file)
@@ -113,59 +113,6 @@ AC_DEFUN(AC_LBL_C_INIT,
                    fi
            fi
     else
-           AC_MSG_CHECKING(that $CC handles ansi prototypes)
-           AC_CACHE_VAL(ac_cv_lbl_cc_ansi_prototypes,
-               AC_TRY_COMPILE(
-                   [#include <sys/types.h>],
-                   [int frob(int, char *)],
-                   ac_cv_lbl_cc_ansi_prototypes=yes,
-                   ac_cv_lbl_cc_ansi_prototypes=no))
-           AC_MSG_RESULT($ac_cv_lbl_cc_ansi_prototypes)
-           if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
-                   case "$host_os" in
-
-                   hpux*)
-                           AC_MSG_CHECKING(for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE))
-                           savedcflags="$CFLAGS"
-                           CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
-                           AC_CACHE_VAL(ac_cv_lbl_cc_hpux_cc_aa,
-                               AC_TRY_COMPILE(
-                                   [#include <sys/types.h>],
-                                   [int frob(int, char *)],
-                                   ac_cv_lbl_cc_hpux_cc_aa=yes,
-                                   ac_cv_lbl_cc_hpux_cc_aa=no))
-                           AC_MSG_RESULT($ac_cv_lbl_cc_hpux_cc_aa)
-                           if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
-                                   AC_MSG_ERROR(see the INSTALL doc for more info)
-                           fi
-                           CFLAGS="$savedcflags"
-                           $1="-Aa $$1"
-                           AC_DEFINE(_HPUX_SOURCE,1,[needed on HP-UX])
-                           ;;
-
-                   osf*)
-                           AC_MSG_CHECKING(for ansi mode in DEC compiler ($CC -std1))
-                           savedcflags="$CFLAGS"
-                           CFLAGS="-std1"
-                           AC_CACHE_VAL(ac_cv_lbl_cc_osf1_cc_std1,
-                               AC_TRY_COMPILE(
-                                   [#include <sys/types.h>],
-                                   [int frob(int, char *)],
-                                   ac_cv_lbl_cc_osf1_cc_std1=yes,
-                                   ac_cv_lbl_cc_osf1_cc_std1=no))
-                           AC_MSG_RESULT($ac_cv_lbl_cc_osf1_cc_std1)
-                           if test $ac_cv_lbl_cc_osf1_cc_std1 = no ; then
-                                   AC_MSG_ERROR(see the INSTALL doc for more info)
-                           fi
-                           CFLAGS="$savedcflags"
-                           $1="-std1 $$1"
-                           ;;
-
-                   *)
-                           AC_MSG_ERROR(see the INSTALL doc for more info)
-                           ;;
-                   esac
-           fi
            $2="$$2 -I/usr/local/include"
            LDFLAGS="$LDFLAGS -L/usr/local/lib"
 
index 9ee068be14feb92586bd60569219fa6d4329b51d..e206621c29a5c01fd5eaf87fdc76119fd95a97c7 100644 (file)
 /* get BSD semantics on Irix */
 #undef _BSD_SIGNALS
 
-/* needed on HP-UX */
-#undef _HPUX_SOURCE
-
 /* define on AIX to get certain functions */
 #undef _SUN
 
index f2bf78781e567935eded809bb64995c4be4e585a..01b062e728cabc9b6d8c70b6c574aa483143bef3 100755 (executable)
--- a/configure
+++ b/configure
@@ -2852,196 +2852,6 @@ echo "${ECHO_T}$ac_cv_lbl_gcc_vers" >&6; }
                    fi
            fi
     else
-           { echo "$as_me:$LINENO: checking that $CC handles ansi prototypes" >&5
-echo $ECHO_N "checking that $CC handles ansi prototypes... $ECHO_C" >&6; }
-           if test "${ac_cv_lbl_cc_ansi_prototypes+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-int
-main ()
-{
-int frob(int, char *)
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_lbl_cc_ansi_prototypes=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lbl_cc_ansi_prototypes=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-           { echo "$as_me:$LINENO: result: $ac_cv_lbl_cc_ansi_prototypes" >&5
-echo "${ECHO_T}$ac_cv_lbl_cc_ansi_prototypes" >&6; }
-           if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
-                   case "$host_os" in
-
-                   hpux*)
-                           { echo "$as_me:$LINENO: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
-echo $ECHO_N "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)... $ECHO_C" >&6; }
-                           savedcflags="$CFLAGS"
-                           CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
-                           if test "${ac_cv_lbl_cc_hpux_cc_aa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-int
-main ()
-{
-int frob(int, char *)
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_lbl_cc_hpux_cc_aa=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lbl_cc_hpux_cc_aa=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-                           { echo "$as_me:$LINENO: result: $ac_cv_lbl_cc_hpux_cc_aa" >&5
-echo "${ECHO_T}$ac_cv_lbl_cc_hpux_cc_aa" >&6; }
-                           if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
-                                   { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5
-echo "$as_me: error: see the INSTALL doc for more info" >&2;}
-   { (exit 1); exit 1; }; }
-                           fi
-                           CFLAGS="$savedcflags"
-                           V_CCOPT="-Aa $V_CCOPT"
-
-cat >>confdefs.h <<\_ACEOF
-#define _HPUX_SOURCE 1
-_ACEOF
-
-                           ;;
-
-                   osf*)
-                           { echo "$as_me:$LINENO: checking for ansi mode in DEC compiler ($CC -std1)" >&5
-echo $ECHO_N "checking for ansi mode in DEC compiler ($CC -std1)... $ECHO_C" >&6; }
-                           savedcflags="$CFLAGS"
-                           CFLAGS="-std1"
-                           if test "${ac_cv_lbl_cc_osf1_cc_std1+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-int
-main ()
-{
-int frob(int, char *)
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_lbl_cc_osf1_cc_std1=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lbl_cc_osf1_cc_std1=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-                           { echo "$as_me:$LINENO: result: $ac_cv_lbl_cc_osf1_cc_std1" >&5
-echo "${ECHO_T}$ac_cv_lbl_cc_osf1_cc_std1" >&6; }
-                           if test $ac_cv_lbl_cc_osf1_cc_std1 = no ; then
-                                   { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5
-echo "$as_me: error: see the INSTALL doc for more info" >&2;}
-   { (exit 1); exit 1; }; }
-                           fi
-                           CFLAGS="$savedcflags"
-                           V_CCOPT="-std1 $V_CCOPT"
-                           ;;
-
-                   *)
-                           { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5
-echo "$as_me: error: see the INSTALL doc for more info" >&2;}
-   { (exit 1); exit 1; }; }
-                           ;;
-                   esac
-           fi
            V_INCLS="$V_INCLS -I/usr/local/include"
            LDFLAGS="$LDFLAGS -L/usr/local/lib"
 
@@ -3091,7 +2901,8 @@ echo $ECHO_N "checking that Ultrix $CC hacks const in prototypes... $ECHO_C" >&6
                    if test "${ac_cv_lbl_cc_const_proto+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
index 7acb9dcf2d32fb4cc93b6953423b658a9ba65b45..59b22cd8a8b736ccf95d6575b3a9f56277e1b662 100644 (file)
@@ -16,7 +16,7 @@ dnl
 #
 
 AC_REVISION($Revision: 1.204 $)
-AC_PREREQ(2.50)
+AC_PREREQ(2.61)
 AC_INIT(tcpdump.c)
 
 AC_CANONICAL_HOST