75 AC_SUBST(LINUX_KERNEL_VERSION,[$linuxversion]) |
75 AC_SUBST(LINUX_KERNEL_VERSION,[$linuxversion]) |
76 AC_SUBST(LINUX_MOD_PATH,[/lib/modules/$kernelrelease/ethercat]) |
76 AC_SUBST(LINUX_MOD_PATH,[/lib/modules/$kernelrelease/ethercat]) |
77 AC_MSG_RESULT([$LINUX_SOURCE_DIR (Kernel $LINUX_KERNEL_RELEASE)]) |
77 AC_MSG_RESULT([$LINUX_SOURCE_DIR (Kernel $LINUX_KERNEL_RELEASE)]) |
78 |
78 |
79 #------------------------------------------------------------------------------ |
79 #------------------------------------------------------------------------------ |
80 # 8139too Kernel |
80 # 8139too driver |
81 #------------------------------------------------------------------------------ |
81 #------------------------------------------------------------------------------ |
|
82 |
|
83 AC_ARG_ENABLE([8139too], |
|
84 AS_HELP_STRING([--enable-8139too], |
|
85 [Enable 8139too driver]), |
|
86 [ |
|
87 case "${enableval}" in |
|
88 yes) enable8139too=1 |
|
89 ;; |
|
90 no) enable8139too=0 |
|
91 ;; |
|
92 *) AC_MSG_ERROR([Invalid value for --enable-8139too]) |
|
93 ;; |
|
94 esac |
|
95 ], |
|
96 [enable8139too=1] |
|
97 ) |
|
98 |
|
99 AM_CONDITIONAL(ENABLE_8139TOO, test "x$enable8139too" = "x1") |
82 |
100 |
83 AC_ARG_WITH([8139too-kernel], |
101 AC_ARG_WITH([8139too-kernel], |
84 AC_HELP_STRING( |
102 AC_HELP_STRING( |
85 [--with-8139too-kernel=<X.Y.Z>], |
103 [--with-8139too-kernel=<X.Y.Z>], |
86 [8139too kernel (only if differing)] |
104 [8139too kernel (only if differing)] |
91 [ |
109 [ |
92 kernel8139too=$linuxversion |
110 kernel8139too=$linuxversion |
93 ] |
111 ] |
94 ) |
112 ) |
95 |
113 |
96 AC_MSG_CHECKING([for kernel for 8139too driver]) |
114 if test "x${enable8139too}" = "x1"; then |
97 |
115 AC_MSG_CHECKING([for kernel for 8139too driver]) |
98 kernels=`ls -1 devices/ | grep -oE "^8139too-.*-" | cut -d "-" -f 2 | uniq` |
116 |
99 found=0 |
117 kernels=`ls -1 devices/ | grep -oE "^8139too-.*-" | cut -d "-" -f 2 | uniq` |
100 for k in $kernels; do |
118 found=0 |
101 if test "$kernel8139too" = "$k"; then |
119 for k in $kernels; do |
102 found=1 |
120 if test "$kernel8139too" = "$k"; then |
103 fi |
121 found=1 |
104 done |
122 fi |
105 if test $found -ne 1; then |
123 done |
106 AC_MSG_ERROR([kernel $kernel8139too not available for 8139too driver!]) |
124 if test $found -ne 1; then |
107 fi |
125 AC_MSG_ERROR([kernel $kernel8139too not available for 8139too driver!]) |
108 |
126 fi |
109 AC_MSG_RESULT([$kernel8139too]) |
127 |
110 |
128 AC_MSG_RESULT([$kernel8139too]) |
111 #------------------------------------------------------------------------------ |
129 fi |
112 # Disable e100 |
130 |
|
131 #------------------------------------------------------------------------------ |
|
132 # e100 driver |
113 #------------------------------------------------------------------------------ |
133 #------------------------------------------------------------------------------ |
114 |
134 |
115 AC_ARG_ENABLE([e100], |
135 AC_ARG_ENABLE([e100], |
116 AS_HELP_STRING([--enable-e100], |
136 AS_HELP_STRING([--enable-e100], |
117 [Enable e100 driver]), |
137 [Enable e100 driver]), |
123 ;; |
143 ;; |
124 *) AC_MSG_ERROR([Invalid value for --enable-e100]) |
144 *) AC_MSG_ERROR([Invalid value for --enable-e100]) |
125 ;; |
145 ;; |
126 esac |
146 esac |
127 ], |
147 ], |
128 [enablee100=0] |
148 [enablee100=0] # disabled by default |
129 ) |
149 ) |
130 |
150 |
131 AM_CONDITIONAL(ENABLE_E100, test "x$enablee100" = x1) |
151 AM_CONDITIONAL(ENABLE_E100, test "x$enablee100" = "x1") |
132 |
|
133 #------------------------------------------------------------------------------ |
|
134 # e100 Kernel |
|
135 #------------------------------------------------------------------------------ |
|
136 |
152 |
137 AC_ARG_WITH([e100-kernel], |
153 AC_ARG_WITH([e100-kernel], |
138 AC_HELP_STRING( |
154 AC_HELP_STRING( |
139 [--with-e100-kernel=<X.Y.Z>], |
155 [--with-e100-kernel=<X.Y.Z>], |
140 [e100 kernel (only if differing)] |
156 [e100 kernel (only if differing)] |
145 [ |
161 [ |
146 kernele100=$linuxversion |
162 kernele100=$linuxversion |
147 ] |
163 ] |
148 ) |
164 ) |
149 |
165 |
150 if test ${enablee100} -eq 1; then |
166 if test "x${enablee100}" = "x1"; then |
151 AC_MSG_CHECKING([for kernel for e100 driver]) |
167 AC_MSG_CHECKING([for kernel for e100 driver]) |
152 |
168 |
153 kernels=`ls -1 devices/ | grep -oE "^e100-.*-" | cut -d "-" -f 2 | uniq` |
169 kernels=`ls -1 devices/ | grep -oE "^e100-.*-" | cut -d "-" -f 2 | uniq` |
154 found=0 |
170 found=0 |
155 for k in $kernels; do |
171 for k in $kernels; do |
163 |
179 |
164 AC_MSG_RESULT([$kernele100]) |
180 AC_MSG_RESULT([$kernele100]) |
165 fi |
181 fi |
166 |
182 |
167 #------------------------------------------------------------------------------ |
183 #------------------------------------------------------------------------------ |
168 # forcedeth |
184 # forcedeth driver |
169 #------------------------------------------------------------------------------ |
185 #------------------------------------------------------------------------------ |
170 |
186 |
171 AC_ARG_ENABLE([forcedeth], |
187 AC_ARG_ENABLE([forcedeth], |
172 AS_HELP_STRING([--enable-forcedeth], |
188 AS_HELP_STRING([--enable-forcedeth], |
173 [Enable forcedeth driver]), |
189 [Enable forcedeth driver]), |
179 ;; |
195 ;; |
180 *) AC_MSG_ERROR([Invalid value for --enable-forcedeth]) |
196 *) AC_MSG_ERROR([Invalid value for --enable-forcedeth]) |
181 ;; |
197 ;; |
182 esac |
198 esac |
183 ], |
199 ], |
184 [enableforcedeth=0] |
200 [enableforcedeth=0] # disabled by default! |
185 ) |
201 ) |
186 |
202 |
187 AM_CONDITIONAL(ENABLE_FORCEDETH, test "x$enableforcedeth" = x1) |
203 AM_CONDITIONAL(ENABLE_FORCEDETH, test "x$enableforcedeth" = "x1") |
188 |
204 |
189 AC_ARG_WITH([forcedeth-kernel], |
205 AC_ARG_WITH([forcedeth-kernel], |
190 AC_HELP_STRING( |
206 AC_HELP_STRING( |
191 [--with-forcedeth-kernel=<X.Y.Z>], |
207 [--with-forcedeth-kernel=<X.Y.Z>], |
192 [forcedeth kernel (only if differing)] |
208 [forcedeth kernel (only if differing)] |
197 [ |
213 [ |
198 kernelforcedeth=$linuxversion |
214 kernelforcedeth=$linuxversion |
199 ] |
215 ] |
200 ) |
216 ) |
201 |
217 |
202 if test ${enableforcedeth} -eq 1; then |
218 if test "x${enableforcedeth}" = "x1"; then |
203 AC_MSG_CHECKING([for kernel for forcedeth driver]) |
219 AC_MSG_CHECKING([for kernel for forcedeth driver]) |
204 |
220 |
205 kernels=`ls -1 devices/ | grep -oE "^forcedeth-.*-" | cut -d "-" -f 2 | uniq` |
221 kernels=`ls -1 devices/ | grep -oE "^forcedeth-.*-" | cut -d "-" -f 2 | uniq` |
206 found=0 |
222 found=0 |
207 for k in $kernels; do |
223 for k in $kernels; do |
293 esac |
309 esac |
294 ], |
310 ], |
295 [dbg=0] |
311 [dbg=0] |
296 ) |
312 ) |
297 |
313 |
298 AM_CONDITIONAL(EC_DBG_IF, test "x$dbg" = x1) |
314 AM_CONDITIONAL(EC_DBG_IF, test "x$dbg" = "x1") |
299 AC_SUBST([EC_DBG_IF],${dbg}) |
315 AC_SUBST([EC_DBG_IF],${dbg}) |
300 |
316 |
301 #------------------------------------------------------------------------------ |
317 #------------------------------------------------------------------------------ |
302 |
318 |
303 # Create config.kbuild |
319 # Create config.kbuild |
305 echo configure: creating config.kbuild... |
321 echo configure: creating config.kbuild... |
306 |
322 |
307 cat > config.kbuild <<EOF |
323 cat > config.kbuild <<EOF |
308 # config.kbuild - created by configure |
324 # config.kbuild - created by configure |
309 EC_DBG_IF := ${dbg} |
325 EC_DBG_IF := ${dbg} |
|
326 EC_ENABLE_8139TOO := ${enablee100} |
310 EC_8139TOO_KERNEL := ${kernel8139too} |
327 EC_8139TOO_KERNEL := ${kernel8139too} |
311 ENABLE_E100 := ${enablee100} |
328 EC_ENABLE_E100 := ${enablee100} |
312 EC_E100_KERNEL := ${kernele100} |
329 EC_E100_KERNEL := ${kernele100} |
313 ENABLE_FORCEDETH := ${enableforcedeth} |
330 EC_ENABLE_FORCEDETH := ${enableforcedeth} |
314 EC_FORCEDETH_KERNEL := ${kernelforcedeth} |
331 EC_FORCEDETH_KERNEL := ${kernelforcedeth} |
315 EC_RTAI_DIR := "${rtaidir}" |
332 EC_RTAI_DIR := "${rtaidir}" |
316 EC_MSR_DIR := "${msrdir}" |
333 EC_MSR_DIR := "${msrdir}" |
317 EOF |
334 EOF |
318 |
335 |