Changeset 43 for trunk/aclocal.m4
- Timestamp:
- Jun 5, 2006, 9:18:36 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/aclocal.m4
r40 r43 10 10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 11 dnl PARTICULAR PURPOSE. 12 13 # Do all the work for Automake. This macro actually does too much --14 # some checks are only needed if your package does certain things.15 # But this isn't really a big deal.16 17 # serial 118 19 20 # serial 121 12 22 13 # … … 25 16 AC_DEFUN([AM_INIT_AUTOMAKE], 26 17 [ 27 AC_REQUIRE([A M_PROG_INSTALL])18 AC_REQUIRE([AC_PROG_INSTALL]) 28 19 PACKAGE=[$1] 29 20 AC_SUBST(PACKAGE) … … 39 30 AC_REQUIRE([AC_PROG_MAKE_SET])]) 40 31 41 42 # serial 143 44 # @defmac AC_PROG_CC_STDC45 # @maindex PROG_CC_STDC46 # @ovindex CC47 # If the C compiler in not in ANSI C mode by default, try to add an option48 # to output variable @code{CC} to make it so. This macro tries various49 # options that select ANSI C on some system or another. It considers the50 # compiler to be in ANSI C mode if it handles function prototypes correctly.51 #52 # If you use this macro, you should check after calling it whether the C53 # compiler has been set to accept ANSI C; if not, the shell variable54 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source55 # code in ANSI C, you can make an un-ANSIfied copy of it by using the56 # program @code{ansi2knr}, which comes with Ghostscript.57 # @end defmac58 59 AC_DEFUN([AM_PROG_CC_STDC],60 [AC_REQUIRE([AC_PROG_CC])61 AC_BEFORE([$0], [AC_C_INLINE])62 AC_BEFORE([$0], [AC_C_CONST])63 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require64 dnl a magic option to avoid problems with ANSI preprocessor commands65 dnl like #elif.66 dnl FIXME: can't do this because then AC_AIX won't work due to a67 dnl circular dependency.68 dnl AC_BEFORE([$0], [AC_PROG_CPP])69 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)70 AC_CACHE_VAL(am_cv_prog_cc_stdc,71 [am_cv_prog_cc_stdc=no72 ac_save_CC="$CC"73 # Don't try gcc -ansi; that turns off useful extensions and74 # breaks some systems' header files.75 # AIX -qlanglvl=ansi76 # Ultrix and OSF/1 -std177 # HP-UX -Aa -D_HPUX_SOURCE78 # SVR4 -Xc -D__EXTENSIONS__79 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"80 do81 CC="$ac_save_CC $ac_arg"82 AC_TRY_COMPILE(83 [#include <stdarg.h>84 #include <stdio.h>85 #include <sys/types.h>86 #include <sys/stat.h>87 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */88 struct buf { int x; };89 FILE * (*rcsopen) (struct buf *, struct stat *, int);90 static char *e (p, i)91 char **p;92 int i;93 {94 return p[i];95 }96 static char *f (char * (*g) (char **, int), char **p, ...)97 {98 char *s;99 va_list v;100 va_start (v,p);101 s = g (p, va_arg (v,int));102 va_end (v);103 return s;104 }105 int test (int i, double x);106 struct s1 {int (*f) (int a);};107 struct s2 {int (*f) (double a);};108 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);109 int argc;110 char **argv;111 ], [112 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];113 ],114 [am_cv_prog_cc_stdc="$ac_arg"; break])115 done116 CC="$ac_save_CC"117 ])118 if test -z "$am_cv_prog_cc_stdc"; then119 AC_MSG_RESULT([none needed])120 else121 AC_MSG_RESULT($am_cv_prog_cc_stdc)122 fi123 case "x$am_cv_prog_cc_stdc" in124 x|xno) ;;125 *) CC="$CC $am_cv_prog_cc_stdc" ;;126 esac127 ])128 32 129 33 # Define a conditional.
Note:
See TracChangeset
for help on using the changeset viewer.