From 985761548a12c044e097873a1a26f445876c962b Mon Sep 17 00:00:00 2001 From: Florian Pose <fp@igh-essen.com> Date: Mon, 25 Sep 2006 11:12:50 +0000 Subject: [PATCH] Corrected autotools. --- configure.ac | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 configure.ac diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000..72da1328 --- /dev/null +++ b/configure.ac @@ -0,0 +1,43 @@ +#------------------------------------------------------------------------------ +# $Id$ +#------------------------------------------------------------------------------ + +AC_INIT([ethercat],[1.1],[fp@igh-essen.com]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-bzip2]) +AC_PREFIX_DEFAULT([/opt/etherlab]) +AC_CONFIG_FILES([Makefile master/Makefile devices/Makefile \ + examples/mini/Makefile \ + examples/rtai/Makefile \ + examples/msr/Makefile]) + +#------------------------------------------------------------------------------ +# Linux sources +#------------------------------------------------------------------------------ + +AC_ARG_WITH([linux-dir], + AC_HELP_STRING( + [--with-linux-dir=<linux-dir>], + [Linux source directory @<:@/lib/modules/<kernelversion>/build@:>@]), + [ ], + [ + modulesdir=/lib/modules/`uname -r` + withval=${modulesdir}/build + ]) + +AC_MSG_CHECKING([for Linux source tree]) + +if test \! -r ${withval}/Makefile; then + echo + AC_MSG_ERROR([No Linux kernel tree in $withval]) +fi + +AC_SUBST(LINUX_DIR,[$withval]) +AC_SUBST(LINUX_MODULES_DIR,[$modulesdir]) + +AC_MSG_RESULT($LINUX_DIR) + +#------------------------------------------------------------------------------ + +AC_OUTPUT + +#------------------------------------------------------------------------------ -- GitLab