1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
Description: Update configure.ac to use AC_LANG_SOURCE macro in the input
parameter of If-Else macros to suppress warnings in autoconf 2.68 and later.
Author: Christopher Hoskin <christopher.hoskin@gmail.com>
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=102270
Last-Update: 2015-02-21
--- a/configure.ac
+++ b/configure.ac
@@ -9,6 +9,7 @@
AH_TEMPLATE([LOCAL_SIZEOF_$2],[Define size of $1])
AC_MSG_CHECKING([for LOCAL_SIZEOF_$2])
AC_RUN_IFELSE([
+AC_LANG_SOURCE([[
#include "confdefs.h"
#include "defaults.h"
int
@@ -23,7 +24,9 @@
return 0;
} else
return 1;
-}],
+}
+]])
+],
ac_familysize=`cat conftest.data`
AC_MSG_RESULT([is $ac_familysize])
AC_DEFINE_UNQUOTED([LOCAL_SIZEOF_$2],[$ac_familysize],[define family size]),
@@ -51,13 +54,16 @@
AH_TEMPLATE([HAVE_$2_IN_STDLIB],[Define size of $1])
AC_MSG_CHECKING([for $2 in stdlib.h])
AC_COMPILE_IFELSE([
+AC_LANG_SOURCE([[
#include <stdlib.h>
int
main()
{
void * mem = malloc(8192);
return 1;
-}],
+}
+]])
+],
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED([HAVE_$2_IN_STDLIB],[1],[$2 in <stdlib.h>]),
AC_MSG_RESULT([not defined])
@@ -326,6 +332,7 @@
AH_TEMPLATE([LOCAL_SIZEOF_POINTER],[Define size of pointer])
AC_MSG_CHECKING([for size of pointer])
AC_RUN_IFELSE([
+AC_LANG_SOURCE([[
#include "confdefs.h"
#include "defaults.h"
int
@@ -339,7 +346,9 @@
return 0;
} else
return 1;
-}],
+}
+]])
+],
# action if true
ac_pointersize=`cat conftest.data`
AC_MSG_RESULT([is $ac_pointersize])
@@ -352,6 +361,7 @@
AC_MSG_CHECKING([for PAGE_SIZE])
AC_RUN_IFELSE([
+AC_LANG_SOURCE([[
/* INPUT */
#include "confdefs.h"
#include "defaults.h"
@@ -363,7 +373,9 @@
#else
return 1;
#endif
-}],[
+}
+]])
+],[
# ACTION IF TRUE
# page size is defined
AC_MSG_RESULT([defined])],[
@@ -371,6 +383,7 @@
# page size is not define, run test
AC_MSG_NOTICE([not defined, trying equivalent...])
AC_RUN_IFELSE([
+AC_LANG_SOURCE([[
/* INPUT 2 */
# include "confdefs.h"
# include "defaults.h"
@@ -405,6 +418,7 @@
}
return 1;
}
+]])
],[
# ACTION IF TRUE 2
# managed to find page size, define it in our config file
@@ -458,6 +472,7 @@
AC_CHECK_TYPES([struct lifreq],[
AC_MSG_CHECKING([for sizeof lifreq - nifreq])
AC_RUN_IFELSE([
+AC_LANG_SOURCE([[
#include "confdefs.h"
#include "defaults.h"
int
@@ -472,7 +487,9 @@
return 0;
} else
return 1;
-} ],
+}
+]])
+ ],
# action if true
ac_lifreqpad=`cat conftest.data`
AC_MSG_RESULT([is $ac_lifreqpad])
@@ -481,6 +498,7 @@
])
AC_MSG_CHECKING([for lifreq union offset])
AC_RUN_IFELSE([
+AC_LANG_SOURCE([[
#include "confdefs.h"
#include "defaults.h"
int
@@ -495,7 +513,9 @@
return 0;
} else
return 1;
-} ],
+}
+]])
+ ],
# action if true
ac_lifreqoffset=`cat conftest.data`
AC_MSG_RESULT([is $ac_lifreqoffset])
|