diff options
| author | Ezra Peisach <epeisach@mit.edu> | 2001-04-11 21:01:09 +0000 |
|---|---|---|
| committer | Ezra Peisach <epeisach@mit.edu> | 2001-04-11 21:01:09 +0000 |
| commit | a37df686067e01183688657053a4ec2953fd5ab1 (patch) | |
| tree | 7db3773f00aeb2aa74e12dcdf662fa1332d1d4f4 /src | |
| parent | 8fcc1a1b7fd3d12dcc2336326dac2a27edfd5f28 (diff) | |
* aclocal.m4 (WITH_CC): Reorganize test: Do not use cache variable
that conflicts with an autoconf internal variable (prefix with
krb5_ instead of ac_). Ensure that the first time AC_PROG_CC is
invoked, is not within a conditional cache block. Autoconf 2.49
only include the compiler test code once in the configure script
instead of everytime it is seen.
aclocal now works with autoconf-2.49d... (as well as earlier versions)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13173 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/aclocal.m4 | 15 |
2 files changed, 17 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d4f2dd891..5b60eb906 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2001-04-11 Ezra Peisach <epeisach@rna.mit.edu> + + * aclocal.m4 (WITH_CC): Reorganize test: Do not use cache variable + that conflicts with an autoconf internal variable (prefix with + krb5_ instead of ac_). Ensure that the first time AC_PROG_CC is + invoked, is not within a conditional cache block. Autoconf 2.49 + only include the compiler test code once in the configure script + instead of everytime it is seen. + Fri Feb 16 16:23:25 2001 Ezra Peisach <epeisach@mit.edu> * Makefile.in: Add $(datadir) to INSTALLMKDIRS for util/et. diff --git a/src/aclocal.m4 b/src/aclocal.m4 index cf775b7cf..012b01e57 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -372,23 +372,24 @@ define(WITH_CC,[ AC_ARG_WITH([cc], [ --with-cc=COMPILER select compiler to use]) AC_MSG_CHECKING(for C compiler) +dnl Default assumed compiler +test -z "$CC" && CC=cc if test "$with_cc" != ""; then - if test "$ac_cv_prog_cc" != "" && test "$ac_cv_prog_cc" != "$with_cc"; then + if test "$krb5_cv_prog_cc" != "" && test "$krb5_cv_prog_cc" != "$with_cc"; then AC_MSG_ERROR(Specified compiler doesn't match cached compiler name; remove cache and try again.) else CC="$with_cc" fi fi -AC_CACHE_VAL(ac_cv_prog_cc,[dnl - test -z "$CC" && CC=cc +AC_MSG_RESULT($CC) +AC_PROG_CC +dnl Test compiler once. Newer versions of autoconf already does a similar test. +AC_CACHE_VAL(krb5_cv_prog_cc,[dnl AC_TRY_LINK([#include <stdio.h>],[printf("hi\n");], , AC_MSG_ERROR(Can't find a working compiler.)) - ac_cv_prog_cc="$CC" + krb5_cv_prog_cc="$CC" ]) -CC="$ac_cv_prog_cc" -AC_MSG_RESULT($CC) -AC_PROG_CC # maybe add -Waggregate-return, or can we assume that actually works by now? extra_gcc_warn_opts="-Wall -Wmissing-prototypes -Wcast-qual \ -Wcast-align -Wconversion -Wshadow -pedantic" |
