-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
222 lines (202 loc) · 5.04 KB
/
configure.in
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/pnpdump.c)
AC_REVISION($Revision: 0.5 $)
AM_INIT_AUTOMAKE(isapnptools, 1.27)
AM_CONFIG_HEADER(include/config.h)
dnl Checks for programs.
# AC_PROG_CXX
AC_PROG_AWK
AC_PROG_CC
AC_PROG_LIBTOOL
dnl for executable extensions
AC_EXEEXT
dnl other support programs
AM_PROG_LEX
#AC_DECL_YYTEXT
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(malloc.h sys/time.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T
dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_SUBST(LIBOBJS) # Shouldn't be necessary ?
#AC_FUNC_ALLOCA
#AC_FUNC_MALLOC
#AC_FUNC_MEMCMP
#AC_FUNC_REALLOC
AC_CHECK_FUNCS(strncmp) # For getopt if required
AC_CHECK_FUNCS(strdup strerror strtol strtoul nanosleep sched_setscheduler snprintf strncasecmp getdelim memcmp)
AC_CHECK_FUNCS(iopl ioperm usleep delay _sleep2)
AC_CHECK_FUNCS([alarm])
AC_CHECK_FUNCS([memset])
dnl check for getopt in standard library
AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] )
AC_ARG_ENABLE(
realtime,
[ --enable-realtime enable realtime scheduling (default=yes)],
if test "$enableval" = yes
then
AC_DEFINE(REALTIME,1)
else
if test "$enableval" != no
then
AC_MSG_ERROR("Invalid value for --enable-realtime\; use --help to show usage")
fi
fi,
AC_DEFINE(REALTIME,1)
)
AC_ARG_ENABLE(
proc,
[ --enable-proc enable resource checks using /proc data (default=yes)],
if test "$enableval" = yes
then
AC_DEFINE(HAVE_PROC,1)
else
if test "$enableval" != no
then
AC_MSG_ERROR("Invalid value for --enable-proc\; use --help to show usage")
fi
fi,
AC_DEFINE(HAVE_PROC,1) dnl
enable_proc=yes
)
AC_ARG_ENABLE(
pci,
[ --enable-pci enable pci resource checks (default=yes)],
if test "$enableval" = yes
then
if test "$enable_proc" = yes
then
AC_DEFINE(ENABLE_PCI,1)
else
AC_MSG_WARN("Cannot --enable-pci without --enable-proc")
fi
else
if test "$enableval" != no
then
AC_MSG_ERROR("Invalid value for --enable-pci\; use --help to show usage")
fi
fi,
if test "$enable_proc" = yes
then
AC_DEFINE(ENABLE_PCI,1)
else
AC_MSG_WARN("--disable-proc implies --disable-pci")
fi
)
AC_ARG_ENABLE(
onreserr,
[ --enable-onreserr enable abort on resource dump error (default=no)],
if test $enableval = yes
then
AC_DEFINE(ABORT_ONRESERR,1)
else
if test "$enableval" != no
then
AC_MSG_ERROR("Invalid value for --enable-onreserr\; use --help to show usage")
fi
fi
)
AC_ARG_ENABLE(
always-report-activation,
[ --enable-always-report-activation enable report activation regardless of (NAME ..) in isapnp (default=no)],
if test $enableval = yes
then
AC_DEFINE(ALWAYSREPORTACTIVATION,1)
else
if test "$enableval" != no
then
AC_MSG_ERROR("Invalid value for --enable-always-report-activation\; use --help to show usage")
fi
fi
)
AC_ARG_ENABLE(
debug,
[ --enable-debug enable debug code (default=no)],
if test $enableval = yes
then
AC_DEFINE(DEBUG,1)
else
if test "$enableval" != no
then
AC_MSG_ERROR("Invalid value for --enable-debug\; use --help to show usage")
fi
fi
)
AC_ARG_ENABLE(
tag-debug,
[ --enable-tag-debug enable tag debugging code (default=no)],
if test $enableval = yes
then
AC_DEFINE(TAG_DEBUG,1)
else
if test "$enableval" != no
then
AC_MSG_ERROR("Invalid value for --enable-tag-debug\; use --help to show usage")
fi
fi
)
AC_ARG_ENABLE(
validate,
[ --enable-validate enable validation (default=yes)],
if test $enableval = yes
then
AC_DEFINE(WANT_TO_VALIDATE,1)
else
if test "$enableval" != no
then
AC_MSG_ERROR("Invalid value for --enable-validate\; use --help to show usage")
fi
fi,
AC_DEFINE(WANT_TO_VALIDATE,1)
)
AC_ARG_ENABLE(
dumpaddr,
[ --enable-dumpaddr enable additional pnpdump output to show every valid address setting (default=no)],
if test $enableval = yes
then
AC_DEFINE(DUMPADDR,1)
else
if test "$enableval" != no
then
AC_MSG_ERROR("Invalid value for --enable-dumpaddr\; use --help to show usage")
fi
fi
)
AC_ARG_ENABLE(
gonefile,
[ --enable-gonefile set the location of the resources already used file (default="/etc/isapnp.gone")],
AC_DEFINE_UNQUOTED(GONEFILE,"$enableval")
)
AC_ARG_ENABLE(
sfn,
[ --enable-sfn enable short file names, assumes source files have been renamed (default=no)],
if test $enableval = yes
then
AC_DEFINE(HAVE_SFN,1)
else
if test "$enableval" != no
then
AC_MSG_ERROR("Invalid value for --enable-sfn\; use --help to show usage")
fi
fi
)
AC_ARG_ENABLE(
static,
[ --enable-static compile to static binaries (default=no)],
if test $enableval = yes
then
[LDFLAGS="$LDFLAGS -static"]
fi
)
AC_OUTPUT(include/Makefile include/isapnp/Makefile src/Makefile demos/Makefile doc/Makefile Makefile)