From: Sebastien GODARD Date: Sun, 10 May 2020 10:07:23 +0000 (+0200) Subject: configure: Use AC_COMPILE_IFELSE instead of old AC_TRY_COMPILE macro X-Git-Tag: v12.4.0~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=34d17859d650993731279ef37297f2a714c1ec0b;p=sysstat configure: Use AC_COMPILE_IFELSE instead of old AC_TRY_COMPILE macro Signed-off-by: Sebastien GODARD --- diff --git a/configure b/configure index da584a0..a8de46c 100755 --- a/configure +++ b/configure @@ -4889,8 +4889,7 @@ $as_echo_n "checking for sensors lib... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #include - + #include int main () { @@ -4986,8 +4985,7 @@ $as_echo_n "checking for PCP libraries... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #include - + #include int main () { @@ -5792,7 +5790,7 @@ else AUX_DOC=yes fi -if test $AUX_DOC != "no"; then +if test $AUX_DOC != "no"; then AUX_DOC="yes" INSTALL_DOC="y" else @@ -7089,7 +7087,7 @@ echo " Installation prefix: $prefix rc directory: ${RC_DIR} Init directory: ${INIT_DIR}" -if test $UCROND != "yes"; then +if test "$UCROND" != "yes"; then echo " Systemd unit dir: ${with_systemdsystemunitdir}" else echo " Use standard cron daemon" diff --git a/configure.in b/configure.in index 13e31de..bbc3e83 100644 --- a/configure.in +++ b/configure.in @@ -129,9 +129,9 @@ if test $HAVE_SENSORS = "y"; then SENSORS=no AC_CHECK_LIB(sensors, sensors_get_detected_chips, LFSENSORS="-lsensors", HAVE_SENSORS="n") AC_MSG_CHECKING(for sensors lib) - AC_TRY_COMPILE(#include - #include - , sensors_cleanup();,SENSORS=yes; DFSENSORS="-DHAVE_SENSORS", HAVE_SENSORS="n"; SENSORS=no) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], + [[sensors_cleanup();]])],SENSORS=yes; DFSENSORS="-DHAVE_SENSORS", HAVE_SENSORS="n"; SENSORS=no) AC_MSG_RESULT($SENSORS) fi AC_SUBST(HAVE_SENSORS) @@ -162,9 +162,9 @@ if test $HAVE_PCP = "y"; then PCP=no AC_CHECK_LIB(pcp, pmGetVersion, LFPCP="-lpcp -lpcp_import", HAVE_PCP="n") AC_MSG_CHECKING(for PCP libraries) - AC_TRY_COMPILE(#include - #include - , pmiEnd();,PCP=yes; DFPCP="-DHAVE_PCP", HAVE_PCP="n"; PCP=no) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], + [[pmiEnd();]])],PCP=yes; DFPCP="-DHAVE_PCP", HAVE_PCP="n"; PCP=no) AC_MSG_RESULT($PCP) fi AC_SUBST(HAVE_PCP) @@ -644,7 +644,7 @@ AC_ARG_ENABLE(documentation, AC_HELP_STRING([--disable-documentation], [do not install documentation]), AUX_DOC=$enableval,AUX_DOC=yes) -if test $AUX_DOC != "no"; then +if test $AUX_DOC != "no"; then AUX_DOC="yes" INSTALL_DOC="y" else @@ -718,7 +718,7 @@ echo " Installation prefix: $prefix rc directory: ${RC_DIR} Init directory: ${INIT_DIR}" -if test $UCROND != "yes"; then +if test "$UCROND" != "yes"; then echo " Systemd unit dir: ${with_systemdsystemunitdir}" else echo " Use standard cron daemon"