/[autoconf]/autoconf/lib/autoconf/c.m4
ViewVC logotype

Diff of /autoconf/lib/autoconf/c.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.161 by kryde, Wed Mar 27 22:43:45 2002 UTC revision 1.162 by petere, Tue Apr 2 18:22:08 2002 UTC
# Line 432  m4_expand_once([_AC_COMPILER_OBJEXT])[]d Line 432  m4_expand_once([_AC_COMPILER_OBJEXT])[]d
432  _AC_LANG_COMPILER_GNU  _AC_LANG_COMPILER_GNU
433  GCC=`test $ac_compiler_gnu = yes && echo yes`  GCC=`test $ac_compiler_gnu = yes && echo yes`
434  _AC_PROG_CC_G  _AC_PROG_CC_G
435    _AC_PROG_CC_STDC
436  # Some people use a C++ compiler to compile C.  Since we use `exit',  # Some people use a C++ compiler to compile C.  Since we use `exit',
437  # in C++ we need to declare it.  In case someone uses the same compiler  # in C++ we need to declare it.  In case someone uses the same compiler
438  # for both compiling C and C++ we need to have the C++ compiler decide  # for both compiling C and C++ we need to have the C++ compiler decide
# Line 723  fi Line 724  fi
724  # 4b. C compiler characteristics.  #  # 4b. C compiler characteristics.  #
725  # -------------------------------- #  # -------------------------------- #
726    
727  # AC_PROG_CC_STDC  # _AC_PROG_CC_STDC
728  # ---------------  # ----------------
729  # If the C compiler in not in ANSI C mode by default, try to add an  # If the C compiler in not in ANSI C mode by default, try to add an
730  # option to output variable @code{CC} to make it so.  This macro tries  # option to output variable @code{CC} to make it so.  This macro tries
731  # various options that select ANSI C on some system or another.  It  # various options that select ANSI C on some system or another.  It
732  # considers the compiler to be in ANSI C mode if it handles function  # considers the compiler to be in ANSI C mode if it handles function
733  # prototypes correctly.  # prototypes correctly.
734  AC_DEFUN([AC_PROG_CC_STDC],  AC_DEFUN([_AC_PROG_CC_STDC],
735  [AC_REQUIRE([AC_PROG_CC])dnl  [AC_MSG_CHECKING([for $CC option to accept ANSI C])
 AC_BEFORE([$0], [AC_C_INLINE])dnl  
 AC_BEFORE([$0], [AC_C_CONST])dnl  
 dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require  
 dnl a magic option to avoid problems with ANSI preprocessor commands  
 dnl like #elif.  
 dnl FIXME: can't do this because then AC_AIX won't work due to a  
 dnl circular dependency.  
 dnl AC_BEFORE([$0], [AC_PROG_CPP])  
 AC_MSG_CHECKING([for $CC option to accept ANSI C])  
736  AC_CACHE_VAL(ac_cv_prog_cc_stdc,  AC_CACHE_VAL(ac_cv_prog_cc_stdc,
737  [ac_cv_prog_cc_stdc=no  [ac_cv_prog_cc_stdc=no
738  ac_save_CC=$CC  ac_save_CC=$CC
# Line 784  char **argv;]], Line 776  char **argv;]],
776  for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"  for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
777  do  do
778    CC="$ac_save_CC $ac_arg"    CC="$ac_save_CC $ac_arg"
779    AC_COMPILE_IFELSE([],    _AC_COMPILE_IFELSE([],
780                      [ac_cv_prog_cc_stdc=$ac_arg                       [ac_cv_prog_cc_stdc=$ac_arg
781  break])  break])
782  done  done
783  rm -f conftest.$ac_ext conftest.$ac_objext  rm -f conftest.$ac_ext conftest.$ac_objext
# Line 798  case "x$ac_cv_prog_cc_stdc" in Line 790  case "x$ac_cv_prog_cc_stdc" in
790      AC_MSG_RESULT([$ac_cv_prog_cc_stdc])      AC_MSG_RESULT([$ac_cv_prog_cc_stdc])
791      CC="$CC $ac_cv_prog_cc_stdc" ;;      CC="$CC $ac_cv_prog_cc_stdc" ;;
792  esac  esac
793  ])# AC_PROG_CC_STDC  ])# _AC_PROG_CC_STDC
794    
795    
796    # AC_PROG_CC_STDC
797    # ---------------
798    # Has been merged into AC_PROG_CC.
799    AU_DEFUN([AC_PROG_CC_STDC], [])
800    
801    
802  # AC_C_CROSS  # AC_C_CROSS
# Line 927  esac Line 925  esac
925  # inline function, only builtin types.  # inline function, only builtin types.
926  #  #
927  AC_DEFUN([AC_C_INLINE],  AC_DEFUN([AC_C_INLINE],
928  [AC_REQUIRE([AC_PROG_CC_STDC])dnl  [AC_CACHE_CHECK([for inline], ac_cv_c_inline,
 AC_CACHE_CHECK([for inline], ac_cv_c_inline,  
929  [ac_cv_c_inline=no  [ac_cv_c_inline=no
930  for ac_kw in inline __inline__ __inline; do  for ac_kw in inline __inline__ __inline; do
931    AC_COMPILE_IFELSE([AC_LANG_SOURCE(    AC_COMPILE_IFELSE([AC_LANG_SOURCE(
# Line 954  esac Line 951  esac
951  # AC_C_CONST  # AC_C_CONST
952  # ----------  # ----------
953  AC_DEFUN([AC_C_CONST],  AC_DEFUN([AC_C_CONST],
954  [AC_REQUIRE([AC_PROG_CC_STDC])dnl  [AC_CACHE_CHECK([for an ANSI C-conforming const], ac_cv_c_const,
 AC_CACHE_CHECK([for an ANSI C-conforming const], ac_cv_c_const,  
955  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
956  [[/* FIXME: Include the comments suggested by Paul. */  [[/* FIXME: Include the comments suggested by Paul. */
957  #ifndef __cplusplus  #ifndef __cplusplus
# Line 1022  fi Line 1018  fi
1018  # volatile away unless it is really necessary to allow the user's code  # volatile away unless it is really necessary to allow the user's code
1019  # to compile cleanly.  Benign compiler failures should be tolerated.  # to compile cleanly.  Benign compiler failures should be tolerated.
1020  AC_DEFUN([AC_C_VOLATILE],  AC_DEFUN([AC_C_VOLATILE],
1021  [AC_REQUIRE([AC_PROG_CC_STDC])dnl  [AC_CACHE_CHECK([for working volatile], ac_cv_c_volatile,
 AC_CACHE_CHECK([for working volatile], ac_cv_c_volatile,  
1022  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
1023  volatile int x;  volatile int x;
1024  int * volatile y;])],  int * volatile y;])],
# Line 1063  fi Line 1058  fi
1058  # Check if the C compiler supports prototypes, included if it needs  # Check if the C compiler supports prototypes, included if it needs
1059  # options.  # options.
1060  AC_DEFUN([AC_C_PROTOTYPES],  AC_DEFUN([AC_C_PROTOTYPES],
1061  [AC_REQUIRE([AC_PROG_CC_STDC])dnl  [AC_REQUIRE([AC_PROG_CC])dnl
1062  AC_MSG_CHECKING([for function prototypes])  AC_MSG_CHECKING([for function prototypes])
1063  if test "$ac_cv_prog_cc_stdc" != no; then  if test "$ac_cv_prog_cc_stdc" != no; then
1064    AC_MSG_RESULT([yes])    AC_MSG_RESULT([yes])

Legend:
Removed from v.1.161  
changed lines
  Added in v.1.162

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26