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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
dnl
dnl Configure.in file for the raidtools
dnl
AC_INIT(mkraid.c)
VERS=0.42
AC_SUBST(VERS)
dnl
dnl Basic autoconf checking
dnl
AC_PROG_CC
AC_PROG_CPP
dnl
dnl Provide useful optimizations if they do not provide it
dnl
if test "x$CFLAGS" = x; then
CFLAGS="-O2 -Wall -Wstrict-prototypes"
fi
AC_SUBST(CFLAGS)
dnl
dnl add flags to link with LinuxThreads 0.6
dnl
if test "x$LDFLAGS_THREADED" = x; then
LDFLAGS_THREADED="$LDFLAGS -lpthread"
fi
AC_SUBST(LDFLAGS_THREADED)
dnl
dnl Allow users to specify an alternate Linux kernel source tree
dnl
LINUXSRC=/usr/src/linux
AC_ARG_WITH(linux,
[--with-linux=dir Specify an alternate location for Linux kernel sources],[
if test x$withval = xyes; then
AC_MSG_WARN(You have to specify a location for the kernel)
exit 1;
fi
LINUXSRC="$withval"
CFLAGS="-I$LINUXSRC/include $CFLAGS"
if test $LINUXSRC/arch; then
AC_MSG_RESULT(Using the Linux kernel sources at $LINUXSRC)
else
AC_MSG_WARN(I can't find a Linux tree at $LINUXSRC)
fi
])
AC_SUBST(LINUXSRC)
dnl
dnl Check if the installed header files have support for RAID
dnl
newtools=""
install_new=""
AC_MSG_CHECKING(for RAID definitions in kernel headers)
AC_TRY_COMPILE([#include <linux/md.h>], [md_superblock_t tmp;],[
AC_DEFINE(HAVE_RAID1)
newtools="mkraid ckraid"
install_new="install_new"
AC_MSG_RESULT(yes)
],[AC_MSG_RESULT(no)])
AC_SUBST(newtools)
AC_SUBST(install_new)
dnl
dnl Provide sensible defaults if the users are not relocating the package
dnl
if test $prefix = NONE; then
prefix=/usr
fi
AC_SUBST(prefix)
dnl
dnl Output Makefile
dnl
AC_OUTPUT(Makefile)
|