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