summaryrefslogtreecommitdiff
path: root/dev-libs/rlog/files/rlog-1.4-autoconf-2.70.patch
blob: f8e07813786db22a3e36147f3ad14da6959cf069 (plain)
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
--- rlog-1.4/configure.ac
+++ rlog-1.4/configure.ac
@@ -64,15 +64,15 @@
 ACX_PTHREAD
 
 AC_ARG_ENABLE(printffp,
-    AS_HELP_STRING([--disable-printffp],
-	    [disables printf attribute on function pointers]),
-    with_printffp=$enableval,with_printffp="test")
+    [AS_HELP_STRING([--disable-printffp],
+	    [disables printf attribute on function pointers])],
+    [with_printffp=$enableval], [with_printffp="test"])
 
-if test "x$with_printffp" = "xtest"; then
+AS_IF([test "x$with_printffp" = "xtest"], [
 
     # check if we can use printf attribute on a function..
     AC_MSG_CHECKING(if __printf__ attribute can apply to function pointers)
-    AC_COMPILE_IFELSE( [[
+    AC_COMPILE_IFELSE([
 	    void testfunc(const char *format, ...)
 	    { }
 	    void (*funcProto)(const char *, ...) 
@@ -85,28 +85,28 @@
 
 		return 0;
 	    }
-	 ]],
+	 ], [
 	with_printffp="yes",
-	with_printffp="no")
+	with_printffp="no"])
 
     AC_MSG_RESULT($with_printffp)
-fi
+])
 
-if test "x$with_printffp" = "xyes"; then
+AS_IF([test "x$with_printffp" = "xyes"], [
     HAVE_PRINTF_FP_PROTOTYPE="1"
-else
+], [
     HAVE_PRINTF_FP_PROTOTYPE="0"
-fi
+])
 AC_SUBST(HAVE_PRINTF_FP_PROTOTYPE)
 
 AC_ARG_ENABLE(vararg,
-    AS_HELP_STRING([--disable-vararg],
-	    [don't use vararg macros even if the compiler supports them]),
-    enable_vararg=$enableval)
-if test "x$enable_vararg" != "xno"; then
+    [AS_HELP_STRING([--disable-vararg],
+	    [don't use vararg macros even if the compiler supports them])],
+    [enable_vararg=$enableval])
+AS_IF([test "x$enable_vararg" != "xno"], [
     # check if the compiler understands __VA_ARGS__ 
 AC_MSG_CHECKING(if compiler has C99 variadac macro)
-AC_COMPILE_IFELSE( [[
+AC_COMPILE_IFELSE([
 #include <stdio.h>
 
 #define PRINT(FMT, ...) printf( FMT, __VA_ARGS__ )
@@ -115,7 +115,7 @@
 {
     PRINT("hello %s", "world");
     return 0;
-} ]], [C99_VARIADAC_MACROS="1" 
+} ], [C99_VARIADAC_MACROS="1" 
        AC_MSG_RESULT(yes)], 
     [C99_VARIADAC_MACROS="0"
      AC_MSG_RESULT(no)])
@@ -123,7 +123,7 @@
 
 # check if the compiler understands pre-c99 variadac macros
 AC_MSG_CHECKING(if compiler has pre-C99 variadac macro)
-AC_COMPILE_IFELSE( [[
+AC_COMPILE_IFELSE([
 #include <stdio.h>
 
 #define PRINT(FMT, ARGS...) printf( FMT, ##ARGS )
@@ -132,15 +132,15 @@
 {
     PRINT("hello %s", "world");
     return 0;
-} ]], [PREC99_VARIADAC_MACROS="1" 
+} ], [PREC99_VARIADAC_MACROS="1" 
        AC_MSG_RESULT(yes)], 
     [PREC99_VARIADAC_MACROS="0"
      AC_MSG_RESULT(no)])
-else
+], [
 dnl vararg support disabled
     C99_VARIADAC_MACROS=0
     PREC99_VARIADAC_MACROS=0
-fi # enable_vararg
+]) # enable_vararg
 
 AC_SUBST(C99_VARIADAC_MACROS)
 AC_SUBST(PREC99_VARIADAC_MACROS)
@@ -148,42 +148,42 @@
 
 # check if the computer has hardware cycle counter
 AC_ARG_ENABLE(rdtsc,
-    AS_HELP_STRING([--enable-rdtsc],
-	    [use rdtsc for benchmarking rlog in test programs]),
-    with_rdtsc=$enableval,with_rdtsc="no")
-if test "x$with_rdtsc" = "xyes"; then
+    [AS_HELP_STRING([--enable-rdtsc],
+	    [use rdtsc for benchmarking rlog in test programs])],
+    [with_rdtsc=$enableval], [with_rdtsc="no"])
+AS_IF([test "x$with_rdtsc" = "xyes"], [
     AC_DEFINE([USE_RDTSC], [1], [Define to use RDTSC calls for benchmark test])
-else
+], [
     AC_DEFINE([USE_RDTSC], [0], [Define to use RDTSC calls for benchmark test])
-fi
+])
 
 AC_ARG_ENABLE(valgrind,
-    AS_HELP_STRING([--disable-valgrind],
-		   [disables valgrind support code.]),
-    with_valgrind=$enableval, with_valgrind="yes" )
+    [AS_HELP_STRING([--disable-valgrind],
+		   [disables valgrind support code.])],
+    [with_valgrind=$enableval], [with_valgrind="yes"])
 USE_VALGRIND="0"
-if test "x$with_valgrind" = "xyes"; then
-    AC_CHECK_HEADER([valgrind/valgrind.h],
+AS_IF([test "x$with_valgrind" = "xyes"], [
+    AC_CHECK_HEADER([valgrind/valgrind.h], [
 	AC_CHECK_DECLS([VALGRIND_PRINTF_BACKTRACE],
-	    USE_VALGRIND="1",,[#include <valgrind/valgrind.h>]))
-fi
+	    [USE_VALGRIND="1"],,[#include <valgrind/valgrind.h>])])
+])
 AC_SUBST(USE_VALGRIND)
 
 
 # allow documentation build to be disabled manually
 AC_ARG_ENABLE(docs,
-    AS_HELP_STRING([--disable-docs],[disable documentation build]),
-    build_docs=$enableval, build_docs="yes")
+    [AS_HELP_STRING([--disable-docs],[disable documentation build])],
+    [build_docs=$enableval], [build_docs="yes"])
 
 # check for tools necessary to build documentation
 AC_PATH_PROG(DOXYGEN, doxygen, [no])
 AC_PATH_PROG(LATEX, latex, [no])
 AC_PATH_PROG(PDFLATEX, pdflatex, [no])
 
-AM_CONDITIONAL(BUILD_DOCS, test "x$build_docs" = "xyes" \
+AM_CONDITIONAL([BUILD_DOCS], [test "x$build_docs" = "xyes" \
 			     -a "x$DOXYGEN" != "xno" \
 			     -a "x$LATEX" != "xno" \
-			     -a "x$PDFLATEX" != "xno" )
+			     -a "x$PDFLATEX" != "xno"])
 
 AC_CHECK_FUNCS(localtime_r)