blob: 51d14e2cf1e23c6e7873fcbc9585193e13ec66b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
dnl -*- shell-script -*-
dnl Process this file with autoconf to produce a configure script.
AC_INIT(kernel/mpio.c)
dnl AM_CONFIG_HEADER(src/config.h)
AC_CANONICAL_SYSTEM()
AC_MSG_RESULT(Building for a ${host} host.)
AM_INIT_AUTOMAKE(mpio, 0.5.0)
dnl Checks for programs.
AC_PROG_MAKE_SET
AC_PROG_CC
AM_PROG_LIBTOOL
dnl check for kernel version
kernel_version=`uname -r 2>&1`
echo -n "checking for kernel version ... "
case "$kernel_version" in
'') kernel_version="?.??"; _k_verc_fail=yes;;
[0-1].[0-9].[0-9]*|2.[0-1].[0-9]*)
_k_verc_fail=no;;
esac
echo $kernel_version
if test "$_k_verc_fail" ; then
echo " Your kernel version is to old."
echo " Please update your system to a kernel version of 2.2.x or higher."
AC_ERROR("too old")
fi
MODULE_PATH="/lib/modules/${kernel_version}"
if test -d "${MODULE_PATH}/kernel/drivers/usb"; then
MODULE_PATH="${MODULE_PATH}/kernel/drivers/usb"
SPEC_PATH="kernel/drivers/usb"
else
MODULE_PATH="${MODULE_PATH}/misc"
SPEC_PATH="misc"
fi
AC_MSG_RESULT(Using module path ${MODULE_PATH}.)
AC_SUBST(MODULE_PATH)
AC_SUBST(SPEC_PATH)
dnl Checks for header files.
AC_CHECK_HEADER(getopt.h,HAVE_GETOPT_H=1,HAVE_GETOPT_H=0)
AC_SUBST(HAVE_GETOPT_H)
dnl ------------------------------------------------------------
# could not find a way to compile the kernel module correctly
# kernel/Makefile
AC_OUTPUT(
Makefile
kernel/Makefile
libmpio/Makefile
mpiosh/Makefile
mpio.spec
)
|