From: David MacKenzie Date: Fri, 26 Aug 1994 22:27:25 +0000 (+0000) Subject: various fixes X-Git-Tag: fsf-origin~509 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=933fd1870523de37c4d12844b8157b38dd9525db;p=thirdparty%2Fautoconf.git various fixes --- diff --git a/NEWS b/NEWS index 0aebc7e4d..db033c614 100644 --- 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. diff --git a/acgeneral.m4 b/acgeneral.m4 index 184534046..ad1a3d5a8 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -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 diff --git a/acspecific.m4 b/acspecific.m4 index 93fbcda86..a82c00032 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -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. diff --git a/autoconf.texi b/autoconf.texi index c081d3790..7f132b2a9 100644 --- a/autoconf.texi +++ b/autoconf.texi @@ -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 -#include +# include +# include #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 -# 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 -#include -#else -#ifdef HAVE_SYS_TIME_H -#include +# include +# include #else -#include -#endif +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# 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 +# include #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 diff --git a/doc/autoconf.texi b/doc/autoconf.texi index c081d3790..7f132b2a9 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -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 -#include +# include +# include #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 -# 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 -#include -#else -#ifdef HAVE_SYS_TIME_H -#include +# include +# include #else -#include -#endif +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# 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 +# include #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 diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 184534046..ad1a3d5a8 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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 diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index 93fbcda86..a82c00032 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -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.