configure.ac
branchstable-1.1
changeset 1731 60b2aad9d40b
parent 1727 861f4715ed6f
child 1732 1cc865ba17c2
--- a/configure.ac	Thu Sep 28 08:31:33 2006 +0000
+++ b/configure.ac	Fri Oct 13 10:07:10 2006 +0000
@@ -2,13 +2,13 @@
 # $Id$
 #------------------------------------------------------------------------------
 
+AC_PREREQ(2.59)
 AC_INIT([ethercat],[1.1],[fp@igh-essen.com])
+AC_CONFIG_AUX_DIR([autoconf])
 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])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_SRCDIR([config.h.in])
 
 #------------------------------------------------------------------------------
 # Linux sources
@@ -52,7 +52,39 @@
 fi
 
 #------------------------------------------------------------------------------
+# Debug interface
+#------------------------------------------------------------------------------
 
+AC_ARG_ENABLE([debug-if],
+		AS_HELP_STRING([--enable-dbg-if],
+						[Create a debug interface for each master @<:@NO@:>@]),
+		[case "${enableval}" in
+			  yes) dbg=1
+				   AC_DEFINE([EC_DBG_IF], [1], [Debug interfaces enabled])
+				   ;;
+			  no)  dbg=0
+				   ;;
+			  *)   AC_MSG_ERROR([Invalid value for --enable-dbg-if])
+				   ;;
+		esac],
+		[dbg=0]
+)
+AM_CONDITIONAL(EC_DBG_IF, test "x$dbg" = x1)
+AC_SUBST([EC_DBG_IF],${dbg})
+
+#------------------------------------------------------------------------------
+
+AC_CONFIG_FILES([
+        Makefile
+        master/Makefile
+        devices/Makefile
+        script/Makefile
+        include/Makefile
+        examples/Makefile
+        examples/mini/Makefile
+        examples/rtai/Makefile
+        examples/msr/Makefile
+])
 AC_OUTPUT
 
 #------------------------------------------------------------------------------