# HG changeset patch # User Edouard Tisserant # Date 1531234145 -7200 # Node ID 00a6a77face6ee543291af9dfe6a612bb81fc271 # Parent 93ef210e9b56c4a8994fb24bb74a0098c737f096 Add module installation path to configure options diff -r 93ef210e9b56 -r 00a6a77face6 Makefile.am --- a/Makefile.am Sun Jul 08 13:40:31 2018 +0200 +++ b/Makefile.am Tue Jul 10 16:49:05 2018 +0200 @@ -85,7 +85,7 @@ modules_install: $(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" \ - INSTALL_MOD_DIR="$(INSTALL_MOD_DIR)" modules_install + $(INSTALL_MOD_PATH_DEFS) modules_install clean-local: $(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" clean diff -r 93ef210e9b56 -r 00a6a77face6 configure.ac --- a/configure.ac Sun Jul 08 13:40:31 2018 +0200 +++ b/configure.ac Tue Jul 10 16:49:05 2018 +0200 @@ -152,21 +152,38 @@ fi #------------------------------------------------------------------------------ +# Linux module installation directory +#------------------------------------------------------------------------------ + +AC_ARG_WITH([module-path], + AC_HELP_STRING( + [--with-module-path=], + [Linux module installation path. Default: /lib/modules/kernel_version] + ), + [modpathdefs="INSTALL_MOD_PATH='$withval'"], + [modpathdefs=""] +) + +AC_MSG_CHECKING([for Linux modules installation directory]) +AC_MSG_RESULT([$with_mod_path]) + +#------------------------------------------------------------------------------ # Linux module installation subdirectory #------------------------------------------------------------------------------ AC_ARG_WITH([module-dir], AC_HELP_STRING( [--with-module-dir=], - [Linux module installation dir. Default: ethercat] - ), - [moddir=[$withval]], - [moddir="ethercat"] -) -AC_SUBST(INSTALL_MOD_DIR,[$moddir]) - -AC_MSG_CHECKING([for Linux modules installation directory]) -AC_MSG_RESULT([$INSTALL_MOD_DIR]) + [Linux module installation subdir. Default: ethercat] + ), + [modpathdefs="$modpathdefs INSTALL_MOD_DIR='$withval'"], + [modpathdefs=""] +) + +AC_MSG_CHECKING([for Linux modules installation subdirectory]) +AC_MSG_RESULT([$with_mod_dir]) + +AC_SUBST(INSTALL_MOD_PATH_DEFS,[$modpathdefs]) #------------------------------------------------------------------------------ # Generic Ethernet driver diff -r 93ef210e9b56 -r 00a6a77face6 master/Makefile.am --- a/master/Makefile.am Sun Jul 08 13:40:31 2018 +0200 +++ b/master/Makefile.am Tue Jul 10 16:49:05 2018 +0200 @@ -85,7 +85,7 @@ modules_install: $(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" \ - INSTALL_MOD_DIR="$(INSTALL_MOD_DIR)" modules_install + $(INSTALL_MOD_PATH_DEFS) modules_install clean-local: $(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" clean