]> granicus.if.org Git - sysstat/commitdiff
configure: Use AC_COMPILE_IFELSE instead of old AC_TRY_COMPILE macro
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 10 May 2020 10:07:23 +0000 (12:07 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 10 May 2020 10:07:23 +0000 (12:07 +0200)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
configure
configure.in

index da584a06be59a258b6fbca439990b8a1b63ff78d..a8de46cd9c4896439cc651cabdc748976787d2d0 100755 (executable)
--- 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 <sensors/sensors.h>
-                      #include <sensors/error.h>
-
+                                            #include <sensors/error.h>
 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 <pcp/pmapi.h>
-                      #include <pcp/import.h>
-
+                                            #include <pcp/import.h>
 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"
index 13e31de75da8397af8f73d7c2a2356affbbe2357..bbc3e83c40d7d57fedee4193499682fc2fce727f 100644 (file)
@@ -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 <sensors/sensors.h>
-                      #include <sensors/error.h>
-                      , sensors_cleanup();,SENSORS=yes; DFSENSORS="-DHAVE_SENSORS", HAVE_SENSORS="n"; SENSORS=no)
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sensors/sensors.h>
+                                            #include <sensors/error.h>]],
+                                          [[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 <pcp/pmapi.h>
-                      #include <pcp/import.h>
-                      , pmiEnd();,PCP=yes; DFPCP="-DHAVE_PCP", HAVE_PCP="n"; PCP=no)
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pcp/pmapi.h>
+                                            #include <pcp/import.h>]],
+                                          [[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"