source: branches/libc-0.6/src/gcc/zlib/acinclude.m4

Last change on this file was 2, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.4 KB
Line 
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
9dnl Fool anybody using AC_PROG_CC.
10AC_PROVIDE([AC_PROG_CC])
11AC_CHECK_PROG(CC, gcc, gcc)
12if test -z "$CC"; then
13 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
14 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
15fi
16
17AC_PROG_CC_GNU
18
19if test $ac_cv_prog_gcc = yes; then
20 GCC=yes
21dnl Check whether -g works, even if CFLAGS is set, in case the package
22dnl plays around with CFLAGS (such as to build both debugging and
23dnl normal versions of a library), tasteless as that idea is.
24 ac_test_CFLAGS="${CFLAGS+set}"
25 ac_save_CFLAGS="$CFLAGS"
26 CFLAGS=
27 AC_PROG_CC_G
28 if test "$ac_test_CFLAGS" = set; then
29 CFLAGS="$ac_save_CFLAGS"
30 elif test $ac_cv_prog_cc_g = yes; then
31 CFLAGS="-g -O2"
32 else
33 CFLAGS="-O2"
34 fi
35else
36 GCC=
37 test "${CFLAGS+set}" = set || CFLAGS="-g"
38fi
39])
40
41sinclude(../libtool.m4)
42dnl The lines below arrange for aclocal not to bring libtool.m4
43dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
44dnl to add a definition of LIBTOOL to Makefile.in.
45ifelse(yes,no,[
46AC_DEFUN([AM_PROG_LIBTOOL],)
47AC_SUBST(LIBTOOL)
48])
Note: See TracBrowser for help on using the repository browser.