]> gcc.gnu.org Git - gcc.git/blame - zlib/acinclude.m4
configure: Rebuilt.
[gcc.git] / zlib / acinclude.m4
CommitLineData
dfac8a13
TT
1# FIXME: We temporarily define our own version of AC_PROG_CC. This is
2# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
3# are probably using a cross compiler, which will not be able to fully
4# link an executable. This should really be fixed in autoconf
5# itself.
6
7AC_DEFUN(LIB_AC_PROG_CC,
8[AC_BEFORE([$0], [AC_PROG_CPP])dnl
9AC_CHECK_PROG(CC, gcc, gcc)
10if test -z "$CC"; then
11 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
12 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
13fi
14
15AC_PROG_CC_GNU
16
17if test $ac_cv_prog_gcc = yes; then
18 GCC=yes
19dnl Check whether -g works, even if CFLAGS is set, in case the package
20dnl plays around with CFLAGS (such as to build both debugging and
21dnl normal versions of a library), tasteless as that idea is.
22 ac_test_CFLAGS="${CFLAGS+set}"
23 ac_save_CFLAGS="$CFLAGS"
24 CFLAGS=
25 AC_PROG_CC_G
26 if test "$ac_test_CFLAGS" = set; then
27 CFLAGS="$ac_save_CFLAGS"
28 elif test $ac_cv_prog_cc_g = yes; then
29 CFLAGS="-g -O2"
30 else
31 CFLAGS="-O2"
32 fi
33else
34 GCC=
35 test "${CFLAGS+set}" = set || CFLAGS="-g"
36fi
37])
This page took 0.045553 seconds and 5 git commands to generate.