]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE
authorHarlan Stenn <stenn@ntp.org>
Thu, 5 Mar 2015 10:17:02 +0000 (10:17 +0000)
committerHarlan Stenn <stenn@ntp.org>
Thu, 5 Mar 2015 10:17:02 +0000 (10:17 +0000)
bk: 54f82d1eagoTAeVHjXjWnJDuUfPQHQ

ChangeLog
configure.ac
sntp/libopts/m4/libopts.m4
sntp/m4/ntp_libntp.m4

index 18b0257519357e56f42c34f9137ccb3a18da2afc..9030d8012a4a76e14f555ae36e48b7a641048359 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
 * [Bug 2771] nonvolatile value is documented in wrong units.
 * [Bug 2773] Early leap announcement from Palisade/Thunderbolt
 * [Bug 2775] ntp-keygen.c fails to compile under Windows.
+* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE.
 ---
 (4.2.8p1) 2015/02/04 Released by Harlan Stenn <stenn@ntp.org>
 
index 7916548ffb4bd7fc749526fba8450efcd5bed407..11881775b169aaf450744b59f76df5ba91838d39 100644 (file)
@@ -1500,12 +1500,13 @@ AC_CACHE_CHECK(
            ;;
         *)
            AC_PREPROC_IFELSE(
-               [
-                   #include <sys/syscall.h>
-                   #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
-                   # error
-                   #endif
-               ],
+               [AC_LANG_SOURCE(
+                   [
+                       #include <sys/syscall.h>
+                       #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
+                       # error
+                       #endif
+                   ])],
                [ntp_cv_var_ntp_syscalls=kernel]
            )
            ;;
@@ -1527,12 +1528,13 @@ AC_CACHE_CHECK(
     [if sys/timex.h has STA_FLL],
     [ntp_cv_var_sta_fll],
     [AC_PREPROC_IFELSE(
-       [
-           #include <sys/timex.h>
-           #ifndef STA_FLL
-           # error
-           #endif
-       ],
+       [AC_LANG_SOURCE(
+           [
+               #include <sys/timex.h>
+               #ifndef STA_FLL
+               # error
+               #endif
+           ])],
        [ntp_cv_var_sta_fll=yes],
        [ntp_cv_var_sta_fll=no]
     )]
@@ -1587,12 +1589,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl TIOCGPPSEV])
 case "$ac_cv_header_termios_h" in
  yes)
     AC_PREPROC_IFELSE(
-       [
+       [AC_LANG_SOURCE([
            #include <termios.h>
            #ifndef TIOCGPPSEV
            # error
            #endif
-       ],
+       ])],
        [ntp_ok=yes],
        [ntp_ok=no]
     )
@@ -1613,12 +1615,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl TIOCSPPS])
 case "$ac_cv_header_termios_h" in
  yes)
     AC_PREPROC_IFELSE(
-       [
+       [AC_LANG_SOURCE([
            #include <termios.h>
            #ifndef TIOCSPPS
            # error
            #endif
-        ],
+        ])],
         [ntp_ok=yes],
         [ntp_ok=no]
     )
@@ -1639,12 +1641,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl CIOGETEV])
 case "$ac_cv_header_sys_ppsclock_h" in
  yes)
     AC_PREPROC_IFELSE(
-       [
+       [AC_LANG_SOURCE([
            #include <sys/ppsclock.h>
            #ifndef CIOGETEV
            # error
            #endif
-       ],
+       ])],
        [ntp_ok=yes],
        [ntp_ok=no]
     )
@@ -1690,7 +1692,7 @@ case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
   yesyes)
     AC_MSG_CHECKING([ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG])
     AC_PREPROC_IFELSE(
-       [
+       [AC_LANG_SOURCE([
            #include <sys/time.h>
            typedef int u_int;
            #include <sys/ppsclock.h>
@@ -1711,7 +1713,7 @@ case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
            #ifndef CIOGETEV
            # error
            #endif
-       ],
+       ])],
        [ntp_ok=yes],
        [ntp_ok=no]
     )
@@ -4265,14 +4267,14 @@ AC_CACHE_CHECK(
     [for interface list sysctl],
     [ntp_cv_iflist_sysctl],
     [AC_PREPROC_IFELSE(
-       [
+       [AC_LANG_SOURCE([
            #include <sys/param.h>
            #include <sys/sysctl.h>
            #include <sys/socket.h>
            #ifndef NET_RT_IFLIST
            # error
            #endif
-       ],
+       ])],
        [ntp_cv_iflist_sysctl=yes],
        [ntp_cv_iflist_sysctl=no]
     )]
index 4a4ca181bcce5d279bfb7524041df1ed1f1a4077..352098b808c6b6366d00f63f2a5289dc1e976571 100644 (file)
@@ -216,7 +216,7 @@ AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[
   LIBREGEX_LIBS=""
   AC_MSG_CHECKING([whether libregex functions properly])
   AC_CACHE_VAL([libopts_cv_with_libregex],[
-  AC_RUN_IFELSE([@%:@include <stdio.h>
+  AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
 @%:@include <stdlib.h>
 @%:@include <sys/types.h>
 @%:@include REGEX_HEADER
@@ -235,7 +235,7 @@ int main() {
     fputs( "error: regex -->.<-- did not match\n", stderr );
     return 1;
   }
-  return 0; }],
+  return 0; }])],
     [libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no],
     [libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE 
   ]) # end of AC_CACHE_VAL for libopts_cv_with_libregex
@@ -260,12 +260,12 @@ libopts_cv_with_libregex=no
 AC_DEFUN([LIBOPTS_RUN_PATHFIND],[
   AC_MSG_CHECKING([whether pathfind(3) works])
   AC_CACHE_VAL([libopts_cv_run_pathfind],[
-  AC_RUN_IFELSE([@%:@include <string.h>
+  AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <string.h>
 @%:@include <stdlib.h>
 int main (int argc, char** argv) {
    char* pz = pathfind( getenv( "PATH" ), "sh", "x" );
    return (pz == 0) ? 1 : 0;
-}],
+}])],
     [libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind
@@ -303,7 +303,7 @@ echo ${dzero}`
 AC_DEFUN([LIBOPTS_RUN_REALPATH],[
   AC_MSG_CHECKING([whether we have a functional realpath(3C)])
   AC_CACHE_VAL([libopts_cv_run_realpath],[
-  AC_RUN_IFELSE([@%:@include <limits.h>
+  AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <limits.h>
 @%:@include <stdlib.h>
 int main (int argc, char** argv) {
 @%:@ifndef PATH_MAX
@@ -313,7 +313,7 @@ choke me!!
 @%:@endif
    char *pz = realpath(argv@<:@0@:>@, zPath);
    return (pz == zPath) ? 0 : 1;
-}],
+}])],
     [libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_realpath
@@ -330,7 +330,7 @@ choke me!!
 AC_DEFUN([LIBOPTS_RUN_STRFTIME],[
   AC_MSG_CHECKING([whether strftime() works])
   AC_CACHE_VAL([libopts_cv_run_strftime],[
-  AC_RUN_IFELSE([@%:@include <time.h>
+  AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <time.h>
 @%:@include <string.h>
 char t_buf@<:@ 64 @:>@;
 int main() {
@@ -346,7 +346,7 @@ int main() {
   tm.tm_yday  = 239; /* days since January 1 @<:@0, 365@:>@ */
   tm.tm_isdst =  1;  /* flag for daylight savings time */
   strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
-  return (strcmp( t_buf, z ) != 0); }],
+  return (strcmp( t_buf, z ) != 0); }])],
     [libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_strftime
@@ -363,10 +363,10 @@ int main() {
 AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[
   AC_MSG_CHECKING([whether fopen accepts "b" mode])
   AC_CACHE_VAL([libopts_cv_run_fopen_binary],[
-  AC_RUN_IFELSE([@%:@include <stdio.h>
+  AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
 int main (int argc, char** argv) {
 FILE* fp = fopen("conftest.@S|@ac_ext", "rb");
-return (fp == NULL) ? 1 : fclose(fp); }],
+return (fp == NULL) ? 1 : fclose(fp); }])],
     [libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
@@ -386,10 +386,10 @@ return (fp == NULL) ? 1 : fclose(fp); }],
 AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[
   AC_MSG_CHECKING([whether fopen accepts "t" mode])
   AC_CACHE_VAL([libopts_cv_run_fopen_text],[
-  AC_RUN_IFELSE([@%:@include <stdio.h>
+  AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include <stdio.h>
 int main (int argc, char** argv) {
 FILE* fp = fopen("conftest.@S|@ac_ext", "rt");
-return (fp == NULL) ? 1 : fclose(fp); }],
+return (fp == NULL) ? 1 : fclose(fp); }])],
     [libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no]
   ) # end of RUN_IFELSE
   ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
index 8842c4a81125c272a647d71b8379351c3da5584c..3aa3dff563a47505304aabb7e4950db2a575943b 100644 (file)
@@ -878,13 +878,13 @@ AC_CACHE_CHECK(
     [for SIGIO],
     [ntp_cv_hdr_def_sigio],
     [AC_PREPROC_IFELSE(
-       [
+       [AC_LANG_SOURCE([
            #include <signal.h>
 
            #ifndef SIGIO
            # error
            #endif
-       ],
+       ])],
        [ntp_cv_hdr_def_sigio=yes],
        [ntp_cv_hdr_def_sigio=no]
     )]
@@ -947,13 +947,13 @@ AC_CACHE_CHECK(
     [for SIGPOLL],
     [ntp_cv_hdr_def_sigpoll],
     [AC_PREPROC_IFELSE(
-       [
+       [AC_LANG_SOURCE([
            #include <signal.h>
            
            #ifndef SIGPOLL
            # error
            #endif
-       ],
+       ])],
        [ntp_cv_hdr_def_sigpoll=yes],
        [ntp_cv_hdr_def_sigpoll=no]
     )]