]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
various fixes
authorDavid MacKenzie <djm@djmnet.org>
Fri, 26 Aug 1994 22:27:25 +0000 (22:27 +0000)
committerDavid MacKenzie <djm@djmnet.org>
Fri, 26 Aug 1994 22:27:25 +0000 (22:27 +0000)
NEWS
acgeneral.m4
acspecific.m4
autoconf.texi
doc/autoconf.texi
lib/autoconf/general.m4
lib/autoconf/specific.m4

diff --git a/NEWS b/NEWS
index 0aebc7e4d803e28b54002190c07c61df29aea7ef..db033c614de87512b058f22d73b9b2b80b75bd6d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,8 +26,6 @@ Major changes in release 2.0:
 * AC_MSG_CHECKING and AC_MSG_RESULT to print test results, on a single line,
   whether or not the test succeeds.  They obsolete AC_CHECKING and AC_VERBOSE.
 * AC_SUBST_FILE, to insert one file into another.
-* AC_SUBST_DEFAULT, to copy a variable from the configure environment into
-  Makefiles with a default fallback value.
 
 ** Changed macros:
 * Many macros renamed, but old names are accepted for backward compatibility.
index 1845340465677ab167095ca913b9ca069a73f4f7..ad1a3d5a803d655eb34dd112d6b5c13db9797b68 100644 (file)
@@ -35,7 +35,7 @@ Install it before installing Autoconf or set the
 M4 environment variable to its path name.
 )m4exit(2)])dnl
 dnl
-define(AC_ACVERSION, 1.106)dnl
+define(AC_ACVERSION, 1.107)dnl
 dnl This is defined by the --version option of the autoconf script.
 ifdef([AC_PRINT_VERSION], [Autoconf version AC_ACVERSION
 m4exit(0)])dnl
@@ -113,7 +113,7 @@ Features and packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --x-includes=DIR        X include files are in DIR
   --x-libraries=DIR       X library files are in DIR
---enable/--with options recognized:$ac_help"
+--enable and --with options recognized:$ac_help"
 changequote([, ])dnl
 
 # Initialize some variables set by options.
@@ -470,10 +470,10 @@ AC_SUBST(LIBS)dnl
 AC_SUBST(prefix)dnl
 AC_SUBST(exec_prefix)dnl
 AC_SUBST(DEFS)dnl
-AC_SUBST_DEFAULT(CFLAGS, -g)dnl
-AC_SUBST_DEFAULT(CXXFLAGS, -g)dnl
-AC_SUBST_DEFAULT(CPPFLAGS, )dnl
-AC_SUBST_DEFAULT(LDFLAGS, )dnl
+AC_SUBST(CFLAGS)dnl
+AC_SUBST(CXXFLAGS)dnl
+AC_SUBST(CPPFLAGS)dnl
+AC_SUBST(LDFLAGS)dnl
 ])dnl
 dnl
 dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
@@ -867,12 +867,6 @@ s%@$1@%%g
 divert(AC_DIVERSION_NORMAL)dnl
 ])])dnl
 dnl
-dnl AC_SUBST_DEFAULT(VARIABLE [, DEFAULT-VALUE])
-AC_DEFUN(AC_SUBST_DEFAULT,
-[$1=${$1-"$2"}
-AC_SUBST($1)dnl
-])dnl
-dnl
 dnl
 dnl ### Printing messages
 dnl
@@ -1636,9 +1630,11 @@ do
   sed ${ac_max_here_lines}q conftest.vals >> ${CONFIG_STATUS}
   echo 'CEOF
   sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
   mv conftest.out conftest.in
 ' >> ${CONFIG_STATUS}
   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
   mv conftest.tail conftest.vals
 done
 rm -f conftest.vals
index 93fbcda86bb1e57a77709e0719dda34d8129bfd7..a82c0003293ae8aa682f23308aa0db5fb7477116 100644 (file)
@@ -59,7 +59,13 @@ else
   ac_cv_prog_gcc=no
 fi])dnl
 AC_MSG_RESULT($ac_cv_prog_gcc)
-if test $ac_cv_prog_gcc = yes; then GCC=yes; else GCC= ; fi
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+  test "${CFLAGS+set}" = set || CFLAGS='-g -O'
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS='-g'
+fi
 ])dnl
 dnl
 AC_DEFUN(AC_PROG_CXX,
@@ -78,7 +84,13 @@ if ${CXX-gcc} -E conftest.C 2>&AC_FD_CC | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_gxx=no
 fi])dnl
-if test $ac_cv_prog_gxx = yes; then GXX=yes; else GXX= ; fi
+if test $ac_cv_prog_gxx = yes; then
+  GXX=yes
+  test "${CXXFLAGS+set}" = set || CXXFLAGS='-g -O'
+else
+  GXX=
+  test "${CXXFLAGS+set}" = set || CXXFLAGS='-g'
+fi
 ])dnl
 dnl
 AC_DEFUN(AC_PROG_GCC_TRADITIONAL,
@@ -1611,8 +1623,8 @@ else
 
   ac_save_LDFLAGS="$LDFLAGS"
   LDFLAGS="$LDFLAGS -L$x_libraries"
-  AC_HAVE_LIBRARY(ICE, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lICE"])
-  AC_HAVE_LIBRARY(SM, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM"])
+  AC_CHECK_LIB(ICE, IceConnectionNumbers, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lICE"])
+  AC_CHECK_LIB(SM, SmcOpenConnection, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM"])
   LDFLAGS="$ac_save_LDFLAGS"
 
   # Check for system-dependent libraries X programs must link with.
@@ -1633,7 +1645,7 @@ else
     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT.
     # Not sure which flavor of 386 Unix this is, but it seems harmless to
     # check for it.
-    AC_HAVE_LIBRARY(nsl, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"])
+    AC_CHECK_LIB(nsl, main, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"])
 
     # lieder@skyler.mavd.honeywell.com says without -lsocket,
     # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
index c081d37908d019a3d41a271756ee5e58d687ed71..7f132b2a91da41637064fd2fd49de1f237bd79f2 100644 (file)
@@ -6,8 +6,8 @@
 @c @setchapternewpage odd
 @c %**end of header
 
-@set EDITION 1.106
-@set VERSION 1.106
+@set EDITION 1.107
+@set VERSION 1.107
 @set UPDATED August 1994
 
 @iftex
@@ -731,9 +731,13 @@ finds.
 
 @defmac AC_PROG_CC
 @maindex PROG_CC
-If @code{gcc} is found, set @code{make} variable @code{CC} to
-@samp{gcc}, and set shell variable @code{GCC} to @samp{yes}.  Otherwise
-set @code{GCC} to be empty.
+Determine a C compiler to use.  If @code{CC} is not already set in the
+environment, check for @code{gcc}, and use @code{cc} if it's not found.
+Set @code{make} variable @code{CC} to the name of the compiler found.
+Set shell variable @code{GCC} to @samp{yes} if it found the GNU C
+compiler, empty otherwise, and if @code{make} variable @code{CFLAGS} was
+not already set, set it to @samp{-g -O} for the GNU C compiler or
+@samp{-g} for other compilers.
 @end defmac
 
 @defmac AC_PROG_CC_C_O
@@ -763,10 +767,12 @@ been called already.
 Determine a C++ compiler to use.  Check if the environment variable
 @var{CXX} or @var{CCC} (in that order) is set; if so, set @code{make}
 variable @code{CXX} to its value.  Otherwise search for a C++ compiler
-under likely names (@code{c++}, @code{g++}, @code{gcc}, and @code{CC}).
-If none of those checks succeed, as a last resort set @code{CXX} to
-@code{gcc}.  Also set shell variable @code{GXX} to @samp{yes} if it
-found the GNU C++ compiler, empty otherwise.
+under likely names (@code{c++}, @code{g++}, @code{gcc}, @code{CC}, and
+@code{cxx}).  If none of those checks succeed, as a last resort set
+@code{CXX} to @code{gcc}.  Also set shell variable @code{GXX} to
+@samp{yes} if it found the GNU C++ compiler, empty otherwise, and if
+@code{make} variable @code{CXXFLAGS} was not already set, set it to
+@samp{-g -O} for the GNU C++ compiler or @samp{-g} for other compilers.
 @end defmac
 
 @defmac AC_PROG_CXXCPP
@@ -1063,8 +1069,8 @@ The way to check if the system supports POSIX.1 is:
 @example
 @group
 #if HAVE_UNISTD_H
-#include <sys/types.h>
-#include <unistd.h>
+# include <sys/types.h>
+# include <unistd.h>
 #endif
 
 #ifdef _POSIX_VERSION
@@ -1200,19 +1206,19 @@ rather than choke on it.
 /* AIX requires this to be the first thing in the file.  */
 #ifdef __GNUC__
 # define alloca __builtin_alloca
-#else /* not __GNUC__ */
+#else
 # if HAVE_ALLOCA_H
 #  include <alloca.h>
-# else /* not HAVE_ALLOCA_H */
+# else
 #  ifdef _AIX
  #pragma alloca
-#  else /* not _AIX */
+#  else
 #   ifndef alloca /* predefined by HP cc +Olibcalls */
 char *alloca ();
-#   endif /* not defined(alloca) */
-#  endif /* not _AIX */
-# endif /* not HAVE_ALLOCA_H */
-#endif /* not __GNUC__ */
+#   endif
+#  endif
+# endif
+#endif
 @end group
 @end example
 @end defmac
@@ -1349,14 +1355,14 @@ example, @code{struct timeval} or @code{struct timezone} as well as
 
 @example
 #ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
+# include <sys/time.h>
+# include <time.h>
 #else
-#include <time.h>
-#endif
+# ifdef HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
 #endif
 @end example
 @end defmac
@@ -1950,7 +1956,8 @@ shell commands @var{action-if-false}.
 This macro calls @code{AC_PROG_CPP} or @code{AC_PROG_CXXCPP} (depending
 on which language is current, @pxref{Language Choice}), if it hasn't
 been called already.  It uses @code{CPPFLAGS}, but not @code{CFLAGS},
-because -g, -O, etc. are not valid options to many C preprocessors.
+because @samp{-g}, @samp{-O}, etc. are not valid options to many C
+preprocessors.
 @end defmac
 
 @defmac AC_TRY_LINK (@var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]})
@@ -2287,22 +2294,6 @@ LIBS="$LIBS -ltermcap"
 @end example
 @end defmac
 
-@defmac AC_SUBST_DEFAULT (@var{variable}, @var{default-value})
-@maindex SUBST_DEFAULT
-Like @code{AC_SUBST}, but if @var{variable} is not set in the
-environment when @code{configure} is run, give it the value
-@var{default-value}.  @var{default-value} is evaluated in shell double
-quotes, so it may refer to other variables or even the output of a
-command.  As an example, Autoconf automatically calls this macro like this:
-
-@example
-AC_SUBST_DEFAULT(CFLAGS, -g)dnl
-AC_SUBST_DEFAULT(CXXFLAGS, -g)dnl
-AC_SUBST_DEFAULT(CPPFLAGS, )dnl
-AC_SUBST_DEFAULT(LDFLAGS, )dnl
-@end example
-@end defmac
-
 @defmac AC_SUBST_FILE (@var{variable})
 @maindex SUBST_FILE
 Substitute the contents of the file named by shell variable
@@ -3047,7 +3038,7 @@ header file conditionally:
 @example
 @group
 #if STDC_HEADERS
-#include <stdlib.h>
+# include <stdlib.h>
 #endif
 @end group
 @end example
@@ -3280,25 +3271,25 @@ directory, this is the same as @code{srcdir}.
 @end defvar
 
 @defvar CFLAGS
-Debugging and optimization options for the C compiler.  The default
-value is @samp{-g} if it is not set in the environment when
-@code{configure} runs.  @code{configure} uses this variable when
-compiling programs to test for C features.
+Debugging and optimization options for the C compiler.  If it is not set
+in the environment when @code{configure} runs, the default value is set
+by @code{AC_PROG_CC} (empty if you don't).  @code{configure} uses this
+variable when compiling programs to test for C features.
 @end defvar
 
 @defvar CPPFLAGS
 Header file search directory (@samp{-I@var{dir}}) and any other
-miscellaneous options for the C preprocessor and compiler.  The default
-value is empty if it is not set in the environment when @code{configure}
-runs.  @code{configure} uses this variable when compiling or
+miscellaneous options for the C preprocessor and compiler.  If it is not
+set in the environment when @code{configure} runs, the default value is
+empty.  @code{configure} uses this variable when compiling or
 preprocessing programs to test for C features.
 @end defvar
 
 @defvar CXXFLAGS
-Debugging and optimization options for the C++ compiler.  The default
-value is @samp{-g} if it is not set in the environment when
-@code{configure} runs.  @code{configure} uses this variable when
-compiling programs to test for C++ features.
+Debugging and optimization options for the C++ compiler.  If it is not
+set in the environment when @code{configure} runs, the default value is
+set by @code{AC_PROG_CXX} (empty if you don't).  @code{configure} uses
+this variable when compiling programs to test for C++ features.
 @end defvar
 
 @defvar DEFS
@@ -3309,8 +3300,8 @@ is called, @code{configure} replaces @samp{@@DEFS@@} with
 
 @defvar LDFLAGS
 Stripping (@samp{-s}) and any other miscellaneous options for the
-linker.  The default value is empty if it is not set in the environment
-when @code{configure} runs.  @code{configure} uses this variable when
+linker.  If it is not set in the environment when @code{configure} runs,
+the default value is empty.  @code{configure} uses this variable when
 linking programs to test for C features.
 @end defvar
 
index c081d37908d019a3d41a271756ee5e58d687ed71..7f132b2a91da41637064fd2fd49de1f237bd79f2 100644 (file)
@@ -6,8 +6,8 @@
 @c @setchapternewpage odd
 @c %**end of header
 
-@set EDITION 1.106
-@set VERSION 1.106
+@set EDITION 1.107
+@set VERSION 1.107
 @set UPDATED August 1994
 
 @iftex
@@ -731,9 +731,13 @@ finds.
 
 @defmac AC_PROG_CC
 @maindex PROG_CC
-If @code{gcc} is found, set @code{make} variable @code{CC} to
-@samp{gcc}, and set shell variable @code{GCC} to @samp{yes}.  Otherwise
-set @code{GCC} to be empty.
+Determine a C compiler to use.  If @code{CC} is not already set in the
+environment, check for @code{gcc}, and use @code{cc} if it's not found.
+Set @code{make} variable @code{CC} to the name of the compiler found.
+Set shell variable @code{GCC} to @samp{yes} if it found the GNU C
+compiler, empty otherwise, and if @code{make} variable @code{CFLAGS} was
+not already set, set it to @samp{-g -O} for the GNU C compiler or
+@samp{-g} for other compilers.
 @end defmac
 
 @defmac AC_PROG_CC_C_O
@@ -763,10 +767,12 @@ been called already.
 Determine a C++ compiler to use.  Check if the environment variable
 @var{CXX} or @var{CCC} (in that order) is set; if so, set @code{make}
 variable @code{CXX} to its value.  Otherwise search for a C++ compiler
-under likely names (@code{c++}, @code{g++}, @code{gcc}, and @code{CC}).
-If none of those checks succeed, as a last resort set @code{CXX} to
-@code{gcc}.  Also set shell variable @code{GXX} to @samp{yes} if it
-found the GNU C++ compiler, empty otherwise.
+under likely names (@code{c++}, @code{g++}, @code{gcc}, @code{CC}, and
+@code{cxx}).  If none of those checks succeed, as a last resort set
+@code{CXX} to @code{gcc}.  Also set shell variable @code{GXX} to
+@samp{yes} if it found the GNU C++ compiler, empty otherwise, and if
+@code{make} variable @code{CXXFLAGS} was not already set, set it to
+@samp{-g -O} for the GNU C++ compiler or @samp{-g} for other compilers.
 @end defmac
 
 @defmac AC_PROG_CXXCPP
@@ -1063,8 +1069,8 @@ The way to check if the system supports POSIX.1 is:
 @example
 @group
 #if HAVE_UNISTD_H
-#include <sys/types.h>
-#include <unistd.h>
+# include <sys/types.h>
+# include <unistd.h>
 #endif
 
 #ifdef _POSIX_VERSION
@@ -1200,19 +1206,19 @@ rather than choke on it.
 /* AIX requires this to be the first thing in the file.  */
 #ifdef __GNUC__
 # define alloca __builtin_alloca
-#else /* not __GNUC__ */
+#else
 # if HAVE_ALLOCA_H
 #  include <alloca.h>
-# else /* not HAVE_ALLOCA_H */
+# else
 #  ifdef _AIX
  #pragma alloca
-#  else /* not _AIX */
+#  else
 #   ifndef alloca /* predefined by HP cc +Olibcalls */
 char *alloca ();
-#   endif /* not defined(alloca) */
-#  endif /* not _AIX */
-# endif /* not HAVE_ALLOCA_H */
-#endif /* not __GNUC__ */
+#   endif
+#  endif
+# endif
+#endif
 @end group
 @end example
 @end defmac
@@ -1349,14 +1355,14 @@ example, @code{struct timeval} or @code{struct timezone} as well as
 
 @example
 #ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
+# include <sys/time.h>
+# include <time.h>
 #else
-#include <time.h>
-#endif
+# ifdef HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
 #endif
 @end example
 @end defmac
@@ -1950,7 +1956,8 @@ shell commands @var{action-if-false}.
 This macro calls @code{AC_PROG_CPP} or @code{AC_PROG_CXXCPP} (depending
 on which language is current, @pxref{Language Choice}), if it hasn't
 been called already.  It uses @code{CPPFLAGS}, but not @code{CFLAGS},
-because -g, -O, etc. are not valid options to many C preprocessors.
+because @samp{-g}, @samp{-O}, etc. are not valid options to many C
+preprocessors.
 @end defmac
 
 @defmac AC_TRY_LINK (@var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]})
@@ -2287,22 +2294,6 @@ LIBS="$LIBS -ltermcap"
 @end example
 @end defmac
 
-@defmac AC_SUBST_DEFAULT (@var{variable}, @var{default-value})
-@maindex SUBST_DEFAULT
-Like @code{AC_SUBST}, but if @var{variable} is not set in the
-environment when @code{configure} is run, give it the value
-@var{default-value}.  @var{default-value} is evaluated in shell double
-quotes, so it may refer to other variables or even the output of a
-command.  As an example, Autoconf automatically calls this macro like this:
-
-@example
-AC_SUBST_DEFAULT(CFLAGS, -g)dnl
-AC_SUBST_DEFAULT(CXXFLAGS, -g)dnl
-AC_SUBST_DEFAULT(CPPFLAGS, )dnl
-AC_SUBST_DEFAULT(LDFLAGS, )dnl
-@end example
-@end defmac
-
 @defmac AC_SUBST_FILE (@var{variable})
 @maindex SUBST_FILE
 Substitute the contents of the file named by shell variable
@@ -3047,7 +3038,7 @@ header file conditionally:
 @example
 @group
 #if STDC_HEADERS
-#include <stdlib.h>
+# include <stdlib.h>
 #endif
 @end group
 @end example
@@ -3280,25 +3271,25 @@ directory, this is the same as @code{srcdir}.
 @end defvar
 
 @defvar CFLAGS
-Debugging and optimization options for the C compiler.  The default
-value is @samp{-g} if it is not set in the environment when
-@code{configure} runs.  @code{configure} uses this variable when
-compiling programs to test for C features.
+Debugging and optimization options for the C compiler.  If it is not set
+in the environment when @code{configure} runs, the default value is set
+by @code{AC_PROG_CC} (empty if you don't).  @code{configure} uses this
+variable when compiling programs to test for C features.
 @end defvar
 
 @defvar CPPFLAGS
 Header file search directory (@samp{-I@var{dir}}) and any other
-miscellaneous options for the C preprocessor and compiler.  The default
-value is empty if it is not set in the environment when @code{configure}
-runs.  @code{configure} uses this variable when compiling or
+miscellaneous options for the C preprocessor and compiler.  If it is not
+set in the environment when @code{configure} runs, the default value is
+empty.  @code{configure} uses this variable when compiling or
 preprocessing programs to test for C features.
 @end defvar
 
 @defvar CXXFLAGS
-Debugging and optimization options for the C++ compiler.  The default
-value is @samp{-g} if it is not set in the environment when
-@code{configure} runs.  @code{configure} uses this variable when
-compiling programs to test for C++ features.
+Debugging and optimization options for the C++ compiler.  If it is not
+set in the environment when @code{configure} runs, the default value is
+set by @code{AC_PROG_CXX} (empty if you don't).  @code{configure} uses
+this variable when compiling programs to test for C++ features.
 @end defvar
 
 @defvar DEFS
@@ -3309,8 +3300,8 @@ is called, @code{configure} replaces @samp{@@DEFS@@} with
 
 @defvar LDFLAGS
 Stripping (@samp{-s}) and any other miscellaneous options for the
-linker.  The default value is empty if it is not set in the environment
-when @code{configure} runs.  @code{configure} uses this variable when
+linker.  If it is not set in the environment when @code{configure} runs,
+the default value is empty.  @code{configure} uses this variable when
 linking programs to test for C features.
 @end defvar
 
index 1845340465677ab167095ca913b9ca069a73f4f7..ad1a3d5a803d655eb34dd112d6b5c13db9797b68 100644 (file)
@@ -35,7 +35,7 @@ Install it before installing Autoconf or set the
 M4 environment variable to its path name.
 )m4exit(2)])dnl
 dnl
-define(AC_ACVERSION, 1.106)dnl
+define(AC_ACVERSION, 1.107)dnl
 dnl This is defined by the --version option of the autoconf script.
 ifdef([AC_PRINT_VERSION], [Autoconf version AC_ACVERSION
 m4exit(0)])dnl
@@ -113,7 +113,7 @@ Features and packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --x-includes=DIR        X include files are in DIR
   --x-libraries=DIR       X library files are in DIR
---enable/--with options recognized:$ac_help"
+--enable and --with options recognized:$ac_help"
 changequote([, ])dnl
 
 # Initialize some variables set by options.
@@ -470,10 +470,10 @@ AC_SUBST(LIBS)dnl
 AC_SUBST(prefix)dnl
 AC_SUBST(exec_prefix)dnl
 AC_SUBST(DEFS)dnl
-AC_SUBST_DEFAULT(CFLAGS, -g)dnl
-AC_SUBST_DEFAULT(CXXFLAGS, -g)dnl
-AC_SUBST_DEFAULT(CPPFLAGS, )dnl
-AC_SUBST_DEFAULT(LDFLAGS, )dnl
+AC_SUBST(CFLAGS)dnl
+AC_SUBST(CXXFLAGS)dnl
+AC_SUBST(CPPFLAGS)dnl
+AC_SUBST(LDFLAGS)dnl
 ])dnl
 dnl
 dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
@@ -867,12 +867,6 @@ s%@$1@%%g
 divert(AC_DIVERSION_NORMAL)dnl
 ])])dnl
 dnl
-dnl AC_SUBST_DEFAULT(VARIABLE [, DEFAULT-VALUE])
-AC_DEFUN(AC_SUBST_DEFAULT,
-[$1=${$1-"$2"}
-AC_SUBST($1)dnl
-])dnl
-dnl
 dnl
 dnl ### Printing messages
 dnl
@@ -1636,9 +1630,11 @@ do
   sed ${ac_max_here_lines}q conftest.vals >> ${CONFIG_STATUS}
   echo 'CEOF
   sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
   mv conftest.out conftest.in
 ' >> ${CONFIG_STATUS}
   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
   mv conftest.tail conftest.vals
 done
 rm -f conftest.vals
index 93fbcda86bb1e57a77709e0719dda34d8129bfd7..a82c0003293ae8aa682f23308aa0db5fb7477116 100644 (file)
@@ -59,7 +59,13 @@ else
   ac_cv_prog_gcc=no
 fi])dnl
 AC_MSG_RESULT($ac_cv_prog_gcc)
-if test $ac_cv_prog_gcc = yes; then GCC=yes; else GCC= ; fi
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+  test "${CFLAGS+set}" = set || CFLAGS='-g -O'
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS='-g'
+fi
 ])dnl
 dnl
 AC_DEFUN(AC_PROG_CXX,
@@ -78,7 +84,13 @@ if ${CXX-gcc} -E conftest.C 2>&AC_FD_CC | egrep yes >/dev/null 2>&1; then
 else
   ac_cv_prog_gxx=no
 fi])dnl
-if test $ac_cv_prog_gxx = yes; then GXX=yes; else GXX= ; fi
+if test $ac_cv_prog_gxx = yes; then
+  GXX=yes
+  test "${CXXFLAGS+set}" = set || CXXFLAGS='-g -O'
+else
+  GXX=
+  test "${CXXFLAGS+set}" = set || CXXFLAGS='-g'
+fi
 ])dnl
 dnl
 AC_DEFUN(AC_PROG_GCC_TRADITIONAL,
@@ -1611,8 +1623,8 @@ else
 
   ac_save_LDFLAGS="$LDFLAGS"
   LDFLAGS="$LDFLAGS -L$x_libraries"
-  AC_HAVE_LIBRARY(ICE, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lICE"])
-  AC_HAVE_LIBRARY(SM, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM"])
+  AC_CHECK_LIB(ICE, IceConnectionNumbers, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lICE"])
+  AC_CHECK_LIB(SM, SmcOpenConnection, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM"])
   LDFLAGS="$ac_save_LDFLAGS"
 
   # Check for system-dependent libraries X programs must link with.
@@ -1633,7 +1645,7 @@ else
     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT.
     # Not sure which flavor of 386 Unix this is, but it seems harmless to
     # check for it.
-    AC_HAVE_LIBRARY(nsl, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"])
+    AC_CHECK_LIB(nsl, main, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"])
 
     # lieder@skyler.mavd.honeywell.com says without -lsocket,
     # socket/setsockopt and other routines are undefined under SCO ODT 2.0.