summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorGuy Harris <gharris@steve.local>2009-07-04 17:57:01 -0700
committerGuy Harris <gharris@steve.local>2009-07-04 17:57:01 -0700
commit706103b136981625b5f9ddf35ca1932eac72fe16 (patch)
treeb2172dc8dec07a1542b9c8ac0d8302aaca4ba972 /aclocal.m4
parent2a5fc2e1fce01d0263852de9191748783be14fe1 (diff)
downloadtcpdump-706103b136981625b5f9ddf35ca1932eac72fe16.tar.gz
In AC_LBL_C_INIT, don't explicitly set V_CCOPT, just set $1, as is done
elsewhere in the macro. For the Alpha C compiler, don't set -std1 unless it's necessary for ANSI mode - we don't want to limit the compiler only to C89 features and, more importantly, C89 headers (<inttypes.h> doesn't work, on at least some versions of Digital UNIX and some C compiler versions, with -std1).
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m424
1 files changed, 21 insertions, 3 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index eda851e2..70ffa41c 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -117,10 +117,28 @@ AC_DEFUN(AC_LBL_C_INIT,
AC_MSG_ERROR(see the INSTALL doc for more info)
fi
CFLAGS="$savedcflags"
- V_CCOPT="-Aa $V_CCOPT"
+ $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)
;;
@@ -132,7 +150,7 @@ AC_DEFUN(AC_LBL_C_INIT,
case "$host_os" in
irix*)
- V_CCOPT="$V_CCOPT -xansi -signed -O"
+ $1="$$1 -xansi -signed -O"
;;
osf*)
@@ -140,7 +158,7 @@ AC_DEFUN(AC_LBL_C_INIT,
# Presumed to be DEC OSF/1, Digital UNIX, or
# Tru64 UNIX.
#
- V_CCOPT="$V_CCOPT -std1 -O"
+ $1="$$1 -O"
;;
ultrix*)