55 m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
55 m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
56 AC_PROG_CXX |
56 AC_PROG_CXX |
57 AC_PROG_LIBTOOL |
57 AC_PROG_LIBTOOL |
58 |
58 |
59 #------------------------------------------------------------------------------ |
59 #------------------------------------------------------------------------------ |
|
60 # Kernel modules |
|
61 #------------------------------------------------------------------------------ |
|
62 |
|
63 AC_MSG_CHECKING([whether to build kernel modules]) |
|
64 |
|
65 AC_ARG_ENABLE([kernel], |
|
66 AS_HELP_STRING([--enable-kernel], |
|
67 [Enable building kernel modules]), |
|
68 [ |
|
69 case "${enableval}" in |
|
70 yes) enablekernel=1 |
|
71 ;; |
|
72 no) enablekernel=0 |
|
73 ;; |
|
74 *) AC_MSG_ERROR([Invalid value for --enable-generic]) |
|
75 ;; |
|
76 esac |
|
77 ], |
|
78 [enablekernel=1] |
|
79 ) |
|
80 |
|
81 if test "x$enablekernel" = "x1"; then |
|
82 AC_MSG_RESULT([yes]) |
|
83 else |
|
84 AC_MSG_RESULT([no]) |
|
85 fi |
|
86 |
|
87 AM_CONDITIONAL(ENABLE_KERNEL, test "x$enablekernel" = "x1") |
|
88 AC_SUBST(ENABLE_KERNEL,[$enablekernel]) |
|
89 |
|
90 #------------------------------------------------------------------------------ |
60 # Linux sources |
91 # Linux sources |
61 #------------------------------------------------------------------------------ |
92 #------------------------------------------------------------------------------ |
|
93 |
|
94 if test "x$enablekernel" = "x1"; then |
62 |
95 |
63 AC_ARG_WITH([linux-dir], |
96 AC_ARG_WITH([linux-dir], |
64 AC_HELP_STRING( |
97 AC_HELP_STRING( |
65 [--with-linux-dir=<DIR>], |
98 [--with-linux-dir=<DIR>], |
66 [Linux kernel sources @<:@running kernel@:>@] |
99 [Linux kernel sources @<:@running kernel@:>@] |
114 linuxversion=`echo $kernelrelease | grep -oE "$regex"` |
147 linuxversion=`echo $kernelrelease | grep -oE "$regex"` |
115 |
148 |
116 AC_SUBST(LINUX_SOURCE_DIR,[$sourcedir]) |
149 AC_SUBST(LINUX_SOURCE_DIR,[$sourcedir]) |
117 AC_MSG_RESULT([$LINUX_SOURCE_DIR (Kernel $linuxversion)]) |
150 AC_MSG_RESULT([$LINUX_SOURCE_DIR (Kernel $linuxversion)]) |
118 |
151 |
|
152 fi |
|
153 |
119 #------------------------------------------------------------------------------ |
154 #------------------------------------------------------------------------------ |
120 # Linux module installation subdirectory |
155 # Linux module installation subdirectory |
121 #------------------------------------------------------------------------------ |
156 #------------------------------------------------------------------------------ |
122 |
157 |
123 AC_ARG_WITH([module-dir], |
158 AC_ARG_WITH([module-dir], |