Whamcloud - gitweb
LU-2302 scripts: fix lfs_migrate with non-English locale
[fs/lustre-release.git] / ldiskfs / configure.ac
1 # Process this file with autoconf to produce a configure script.
2
3 AC_INIT([Lustre ldiskfs], 3.3.0, [http://bugs.whamcloud.com/])
4 AC_CONFIG_SRCDIR([lustre-ldiskfs.spec.in])
5
6 # Don't look for install-sh, etc. in ..
7 AC_CONFIG_AUX_DIR([.])
8
9 AC_CANONICAL_SYSTEM
10
11 AM_INIT_AUTOMAKE([1.9 tar-ustar])
12
13 AC_PROG_CC
14
15 LB_CANONICAL_SYSTEM
16
17 LB_DOWNSTREAM_RELEASE
18
19 LB_BUILDID
20
21 LB_INCLUDE_RULES
22 LB_PROG_CC
23
24 AC_ARG_ENABLE([dist],
25         AC_HELP_STRING([--enable-dist],
26                         [only configure enough for make dist]),
27         [enable_dist='yes'],[enable_dist='no'])
28 AC_MSG_RESULT([$enable_dist])
29 if test x$enable_dist != xno; then
30         enable_modules='no'
31 fi
32
33 #
34 # LC_TARGET_SUPPORTED
35 #
36 # is the target os supported?
37 #
38 AC_DEFUN([LC_TARGET_SUPPORTED],
39 [case $target_os in
40         linux* | darwin*)
41 $1
42                 ;;
43         *)
44 $2
45                 ;;
46 esac
47 ])
48
49 AC_MSG_CHECKING([whether to build kernel modules])
50 AC_ARG_ENABLE([modules],
51               AC_HELP_STRING([--disable-modules],
52                              [disable building of Lustre kernel modules]),[],
53                              [LC_TARGET_SUPPORTED([enable_modules='yes'],
54                              [enable_modules='no'])])
55 AC_MSG_RESULT([$enable_modules])
56
57 if test x$enable_modules = xyes ; then
58         LB_PROG_LINUX
59         LB_LINUX_MODPOST
60 fi
61
62 LB_LDISKFS_SERIES([test x$enable_dist = xno])
63
64 AC_MSG_CHECKING([whether to build Lustre server support])
65 AC_ARG_ENABLE([server],
66         AC_HELP_STRING([--disable-server],
67                        [disable Lustre server support]),
68         [],[
69                 if test -n "$LDISKFS_SERIES"; then
70                         enable_server='yes'
71                 else
72                         enable_server='no'
73                 fi
74         ])
75 AC_MSG_RESULT([$enable_server])
76
77 LB_CONFIG_HEADERS
78
79 # These allow Lustre Makefiles and autoMakefiles to be used unchanged.
80 AM_CONDITIONAL(MODULES, true)
81 AM_CONDITIONAL(LINUX, true)
82 AM_CONDITIONAL(DARWIN, true)
83
84 LDISKFSDIR="$PWD/ldiskfs"
85 AC_SUBST(LDISKFSDIR)
86
87 AC_MSG_CHECKING([whether to enable quilt for making ldiskfs])
88 AC_ARG_ENABLE([quilt],
89               AC_HELP_STRING([--disable-quilt],
90                              [disable use of quilt for ldiskfs]),[],
91                              [enable_quilt='yes'])
92 AC_MSG_RESULT([$enable_quilt])
93
94 AC_PATH_PROG(PATCH, patch, [no])
95
96 if test x$enable_quilt = xno ; then
97     QUILT="no"
98 else
99     AC_PATH_PROG(QUILT, quilt, [no])
100 fi
101
102 if test x$enable_server$PATCH$QUILT = xyesnono ; then
103         AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module])
104 fi
105
106 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
107
108 if test x$enable_server$enable_dist = xyesno ; then
109 LB_LDISKFS_EXT_DIR
110 LB_LDISKFS_EXT_SOURCE
111 LB_LDISKFS_DEFINE_OPTIONS
112 fi
113
114 AM_CONDITIONAL(LDISKFS_PDO, test x$with_ldiskfs_pdo = xyes)
115
116 AC_SUBST(ac_configure_args)
117
118 LB_CONFIG_FILES
119 AC_CONFIG_FILES([ldiskfs/autoMakefile ldiskfs/Makefile])
120
121 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.* Modules.symvers Module.symvers'
122 AC_SUBST(MOSTLYCLEANFILES)
123
124 AC_OUTPUT