From: Guy Harris Date: Sun, 12 May 2013 19:35:43 +0000 (-0700) Subject: Require autoconf 2.61 as a minimum, and eliminate stuff that does for you. X-Git-Tag: tcpdump-4.5.0~80^2~6 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/985ad5e3597a3dae342bc58c81960d156fd9b3bd Require autoconf 2.61 as a minimum, and eliminate stuff that does for you. 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. --- diff --git a/aclocal.m4 b/aclocal.m4 index 34e03fce..558eb6bc 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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 ], - [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 ], - [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 ], - [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" diff --git a/config.h.in b/config.h.in index 9ee068be..e206621c 100644 --- a/config.h.in +++ b/config.h.in @@ -279,9 +279,6 @@ /* get BSD semantics on Irix */ #undef _BSD_SIGNALS -/* needed on HP-UX */ -#undef _HPUX_SOURCE - /* define on AIX to get certain functions */ #undef _SUN diff --git a/configure b/configure index f2bf7878..01b062e7 100755 --- 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 -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 -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 -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 diff --git a/configure.in b/configure.in index 7acb9dcf..59b22cd8 100644 --- a/configure.in +++ b/configure.in @@ -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