mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-02-06 03:41:52 +08:00
Add --enable-examples switch (default on) to configure script
This commit is contained in:
@@ -21,7 +21,11 @@
|
||||
#
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
obj-m := examples/ master/ devices/
|
||||
obj-m := master/ devices/
|
||||
|
||||
ifeq (@ENABLE_EXAMPLES@,1)
|
||||
obj-m += examples/
|
||||
endif
|
||||
|
||||
ifeq (@ENABLE_TTY@,1)
|
||||
obj-m += tty/
|
||||
|
||||
31
configure.ac
31
configure.ac
@@ -1209,6 +1209,37 @@ fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_FAKEUSERLIB, test "x$fakeuserlib" = "x1")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# example programs
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
AC_MSG_CHECKING([whether to build the examples])
|
||||
|
||||
AC_ARG_ENABLE([examples],
|
||||
AS_HELP_STRING([--enable-examples],
|
||||
[Generation of example modules (default: yes)]),
|
||||
[
|
||||
case "${enableval}" in
|
||||
yes) examples=1
|
||||
;;
|
||||
no) examples=0
|
||||
;;
|
||||
*) AC_MSG_ERROR([Invalid value for --enable-examples])
|
||||
;;
|
||||
esac
|
||||
],
|
||||
[examples=1]
|
||||
)
|
||||
|
||||
if test "x${examples}" = "x1"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_EXAMPLES, test "x$examples" = "x1")
|
||||
AC_SUBST(ENABLE_EXAMPLES,[$examples])
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# TTY driver
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user