1 #------------------------------------------------------------------------------ |
1 #------------------------------------------------------------------------------ |
2 # $Id$ |
2 # $Id$ |
3 #------------------------------------------------------------------------------ |
3 #------------------------------------------------------------------------------ |
4 |
4 |
5 AC_PREREQ(2.59) |
5 AC_PREREQ(2.59) |
6 AC_INIT([ethercat],[1.3.1],[fp@igh-essen.com]) |
6 AC_INIT([ethercat],[1.3.2],[fp@igh-essen.com]) |
7 AC_CONFIG_AUX_DIR([autoconf]) |
7 AC_CONFIG_AUX_DIR([autoconf]) |
8 AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2]) |
8 AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2]) |
9 AC_PREFIX_DEFAULT([/opt/etherlab]) |
9 AC_PREFIX_DEFAULT([/opt/etherlab]) |
10 AC_CONFIG_HEADERS([config.h]) |
10 AC_CONFIG_HEADERS([config.h]) |
11 AC_CONFIG_SRCDIR([config.h.in]) |
11 AC_CONFIG_SRCDIR([config.h.in]) |
95 ], |
95 ], |
96 [enable8139too=1] |
96 [enable8139too=1] |
97 ) |
97 ) |
98 |
98 |
99 AM_CONDITIONAL(ENABLE_8139TOO, test "x$enable8139too" = "x1") |
99 AM_CONDITIONAL(ENABLE_8139TOO, test "x$enable8139too" = "x1") |
|
100 AC_SUBST(ENABLE_8139TOO,[$enable8139too]) |
100 |
101 |
101 AC_ARG_WITH([8139too-kernel], |
102 AC_ARG_WITH([8139too-kernel], |
102 AC_HELP_STRING( |
103 AC_HELP_STRING( |
103 [--with-8139too-kernel=<X.Y.Z>], |
104 [--with-8139too-kernel=<X.Y.Z>], |
104 [8139too kernel (only if differing)] |
105 [8139too kernel (only if differing)] |
126 fi |
127 fi |
127 |
128 |
128 AC_MSG_RESULT([$kernel8139too]) |
129 AC_MSG_RESULT([$kernel8139too]) |
129 fi |
130 fi |
130 |
131 |
|
132 AC_SUBST(KERNEL_8139TOO,[$kernel8139too]) |
|
133 |
131 #------------------------------------------------------------------------------ |
134 #------------------------------------------------------------------------------ |
132 # e100 driver |
135 # e100 driver |
133 #------------------------------------------------------------------------------ |
136 #------------------------------------------------------------------------------ |
134 |
137 |
135 AC_ARG_ENABLE([e100], |
138 AC_ARG_ENABLE([e100], |
147 ], |
150 ], |
148 [enablee100=0] # disabled by default |
151 [enablee100=0] # disabled by default |
149 ) |
152 ) |
150 |
153 |
151 AM_CONDITIONAL(ENABLE_E100, test "x$enablee100" = "x1") |
154 AM_CONDITIONAL(ENABLE_E100, test "x$enablee100" = "x1") |
|
155 AC_SUBST(ENABLE_E100,[$enablee100]) |
152 |
156 |
153 AC_ARG_WITH([e100-kernel], |
157 AC_ARG_WITH([e100-kernel], |
154 AC_HELP_STRING( |
158 AC_HELP_STRING( |
155 [--with-e100-kernel=<X.Y.Z>], |
159 [--with-e100-kernel=<X.Y.Z>], |
156 [e100 kernel (only if differing)] |
160 [e100 kernel (only if differing)] |
178 fi |
182 fi |
179 |
183 |
180 AC_MSG_RESULT([$kernele100]) |
184 AC_MSG_RESULT([$kernele100]) |
181 fi |
185 fi |
182 |
186 |
|
187 AC_SUBST(KERNEL_E100,[$kernele100]) |
|
188 |
183 #------------------------------------------------------------------------------ |
189 #------------------------------------------------------------------------------ |
184 # forcedeth driver |
190 # forcedeth driver |
185 #------------------------------------------------------------------------------ |
191 #------------------------------------------------------------------------------ |
186 |
192 |
187 AC_ARG_ENABLE([forcedeth], |
193 AC_ARG_ENABLE([forcedeth], |
199 ], |
205 ], |
200 [enableforcedeth=0] # disabled by default! |
206 [enableforcedeth=0] # disabled by default! |
201 ) |
207 ) |
202 |
208 |
203 AM_CONDITIONAL(ENABLE_FORCEDETH, test "x$enableforcedeth" = "x1") |
209 AM_CONDITIONAL(ENABLE_FORCEDETH, test "x$enableforcedeth" = "x1") |
|
210 AC_SUBST(ENABLE_FORCEDETH,[$enableforcedeth]) |
204 |
211 |
205 AC_ARG_WITH([forcedeth-kernel], |
212 AC_ARG_WITH([forcedeth-kernel], |
206 AC_HELP_STRING( |
213 AC_HELP_STRING( |
207 [--with-forcedeth-kernel=<X.Y.Z>], |
214 [--with-forcedeth-kernel=<X.Y.Z>], |
208 [forcedeth kernel (only if differing)] |
215 [forcedeth kernel (only if differing)] |
230 fi |
237 fi |
231 |
238 |
232 AC_MSG_RESULT([$kernelforcedeth]) |
239 AC_MSG_RESULT([$kernelforcedeth]) |
233 fi |
240 fi |
234 |
241 |
|
242 AC_SUBST(KERNEL_FORCEDETH,[$kernelforcedeth]) |
|
243 |
235 #------------------------------------------------------------------------------ |
244 #------------------------------------------------------------------------------ |
236 # e1000 driver |
245 # e1000 driver |
237 #------------------------------------------------------------------------------ |
246 #------------------------------------------------------------------------------ |
238 |
247 |
239 AC_ARG_ENABLE([e1000], |
248 AC_ARG_ENABLE([e1000], |
251 ], |
260 ], |
252 [enablee1000=0] # disabled by default |
261 [enablee1000=0] # disabled by default |
253 ) |
262 ) |
254 |
263 |
255 AM_CONDITIONAL(ENABLE_E1000, test "x$enablee1000" = "x1") |
264 AM_CONDITIONAL(ENABLE_E1000, test "x$enablee1000" = "x1") |
|
265 AC_SUBST(ENABLE_E1000,[$enablee1000]) |
256 |
266 |
257 AC_ARG_WITH([e1000-kernel], |
267 AC_ARG_WITH([e1000-kernel], |
258 AC_HELP_STRING( |
268 AC_HELP_STRING( |
259 [--with-e1000-kernel=<X.Y.Z>], |
269 [--with-e1000-kernel=<X.Y.Z>], |
260 [e1000 kernel (only if differing)] |
270 [e1000 kernel (only if differing)] |
282 fi |
292 fi |
283 |
293 |
284 AC_MSG_RESULT([$kernele1000]) |
294 AC_MSG_RESULT([$kernele1000]) |
285 fi |
295 fi |
286 |
296 |
|
297 AC_SUBST(KERNEL_E1000,[$kernele1000]) |
|
298 |
287 #------------------------------------------------------------------------------ |
299 #------------------------------------------------------------------------------ |
288 # RTAI path (optional) |
300 # RTAI path (optional) |
289 #------------------------------------------------------------------------------ |
301 #------------------------------------------------------------------------------ |
290 |
302 |
291 AC_ARG_WITH([rtai-dir], |
303 AC_ARG_WITH([rtai-dir], |
308 else |
320 else |
309 if test \! -r ${rtaidir}/include/rtai.h; then |
321 if test \! -r ${rtaidir}/include/rtai.h; then |
310 AC_MSG_ERROR([no RTAI installation found in ${rtaidir}!]) |
322 AC_MSG_ERROR([no RTAI installation found in ${rtaidir}!]) |
311 fi |
323 fi |
312 AC_MSG_RESULT([$rtaidir]) |
324 AC_MSG_RESULT([$rtaidir]) |
313 AC_SUBST(RTAI_DIR,[$rtaidir]) |
325 fi |
314 fi |
326 |
|
327 AC_SUBST(RTAI_DIR,[$rtaidir]) |
315 |
328 |
316 #------------------------------------------------------------------------------ |
329 #------------------------------------------------------------------------------ |
317 # MSR path (optional) |
330 # MSR path (optional) |
318 #------------------------------------------------------------------------------ |
331 #------------------------------------------------------------------------------ |
319 |
332 |
337 else |
350 else |
338 if test \! -r ${msrdir}/include/msr.h; then |
351 if test \! -r ${msrdir}/include/msr.h; then |
339 AC_MSG_ERROR([no MSR installation found in ${msrdir}!]) |
352 AC_MSG_ERROR([no MSR installation found in ${msrdir}!]) |
340 fi |
353 fi |
341 AC_MSG_RESULT([$msrdir]) |
354 AC_MSG_RESULT([$msrdir]) |
342 AC_SUBST(MSR_DIR,[$msrdir]) |
355 fi |
343 fi |
356 |
|
357 AC_SUBST(MSR_DIR,[$msrdir]) |
344 |
358 |
345 #------------------------------------------------------------------------------ |
359 #------------------------------------------------------------------------------ |
346 # Debug interface |
360 # Debug interface |
347 #------------------------------------------------------------------------------ |
361 #------------------------------------------------------------------------------ |
348 |
362 |
364 |
378 |
365 if test "x${dbg}" = "x1"; then |
379 if test "x${dbg}" = "x1"; then |
366 AC_DEFINE([EC_DEBUG_IF], [1], [Debug interfaces enabled]) |
380 AC_DEFINE([EC_DEBUG_IF], [1], [Debug interfaces enabled]) |
367 fi |
381 fi |
368 AM_CONDITIONAL(ENABLE_DEBUG_IF, test "x$dbg" = "x1") |
382 AM_CONDITIONAL(ENABLE_DEBUG_IF, test "x$dbg" = "x1") |
|
383 AC_SUBST(ENABLE_DEBUG_IF,[$dbg]) |
369 |
384 |
370 #------------------------------------------------------------------------------ |
385 #------------------------------------------------------------------------------ |
371 # Debug ring |
386 # Debug ring |
372 #------------------------------------------------------------------------------ |
387 #------------------------------------------------------------------------------ |
373 |
388 |
410 ], |
425 ], |
411 [dummy=0] |
426 [dummy=0] |
412 ) |
427 ) |
413 |
428 |
414 AM_CONDITIONAL(ENABLE_DUMMY, test "x$dummy" = "x1") |
429 AM_CONDITIONAL(ENABLE_DUMMY, test "x$dummy" = "x1") |
|
430 AC_SUBST(ENABLE_DUMMY,[$dummy]) |
415 |
431 |
416 #------------------------------------------------------------------------------ |
432 #------------------------------------------------------------------------------ |
417 # Ethernet-over-EtherCAT support |
433 # Ethernet-over-EtherCAT support |
418 #------------------------------------------------------------------------------ |
434 #------------------------------------------------------------------------------ |
419 |
435 |
435 |
451 |
436 if test "x${eoe}" = "x1"; then |
452 if test "x${eoe}" = "x1"; then |
437 AC_DEFINE([EC_EOE], [1], [EoE support enabled]) |
453 AC_DEFINE([EC_EOE], [1], [EoE support enabled]) |
438 fi |
454 fi |
439 AM_CONDITIONAL(ENABLE_EOE, test "x$eoe" = "x1") |
455 AM_CONDITIONAL(ENABLE_EOE, test "x$eoe" = "x1") |
440 |
456 AC_SUBST(ENABLE_EOE,[$eoe]) |
441 #------------------------------------------------------------------------------ |
|
442 |
|
443 # Create config.kbuild |
|
444 |
|
445 echo configure: creating config.kbuild... |
|
446 |
|
447 cat > config.kbuild <<EOF |
|
448 # config.kbuild - created by configure |
|
449 ENABLE_8139TOO := ${enable8139too} |
|
450 KERNEL_8139TOO := ${kernel8139too} |
|
451 ENABLE_E100 := ${enablee100} |
|
452 KERNEL_E100 := ${kernele100} |
|
453 ENABLE_FORCEDETH := ${enableforcedeth} |
|
454 KERNEL_FORCEDETH := ${kernelforcedeth} |
|
455 ENABLE_E1000 := ${enablee1000} |
|
456 KERNEL_E1000 := ${kernele1000} |
|
457 RTAI_DIR := "${rtaidir}" |
|
458 MSR_DIR := "${msrdir}" |
|
459 ENABLE_DEBUG_IF := ${dbg} |
|
460 ENABLE_DUMMY := ${dummy} |
|
461 ENABLE_EOE := ${eoe} |
|
462 EOF |
|
463 |
457 |
464 #------------------------------------------------------------------------------ |
458 #------------------------------------------------------------------------------ |
465 |
459 |
466 AC_CONFIG_FILES([ |
460 AC_CONFIG_FILES([ |
|
461 Doxyfile |
|
462 Kbuild |
467 Makefile |
463 Makefile |
|
464 master/Kbuild |
468 master/Makefile |
465 master/Makefile |
|
466 devices/Kbuild |
469 devices/Makefile |
467 devices/Makefile |
470 devices/e1000/Makefile |
468 devices/e1000/Makefile |
|
469 devices/e1000/Kbuild |
471 script/Makefile |
470 script/Makefile |
472 script/init.d/Makefile |
471 script/init.d/Makefile |
473 script/sysconfig/Makefile |
472 script/sysconfig/Makefile |
474 include/Makefile |
473 include/Makefile |
475 examples/Makefile |
474 examples/Makefile |
|
475 examples/mini/Kbuild |
476 examples/mini/Makefile |
476 examples/mini/Makefile |
|
477 examples/rtai/Kbuild |
477 examples/rtai/Makefile |
478 examples/rtai/Makefile |
|
479 examples/msr/Kbuild |
478 examples/msr/Makefile |
480 examples/msr/Makefile |
|
481 dummy/Kbuild |
479 dummy/Makefile |
482 dummy/Makefile |
480 ]) |
483 ]) |
481 AC_OUTPUT |
484 AC_OUTPUT |
482 |
485 |
483 #------------------------------------------------------------------------------ |
486 #------------------------------------------------------------------------------ |