Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 1 | AC_INIT(version.h) |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 2 | AC_PREREQ(2.12) |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 3 | MCONFIG=./MCONFIG |
| 4 | AC_SUBST_FILE(MCONFIG) |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 5 | BINARY_TYPE=bin |
| 6 | dnl |
| 7 | dnl This is to figure out the version number and the date.... |
| 8 | dnl |
| 9 | E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \ |
| 10 | | awk '{print $3}' | tr \" " " | awk '{print $1}'` |
| 11 | DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \ |
| 12 | | tr \" " "` |
| 13 | MONTH=`echo $DATE | awk -F- '{print $2}'` |
| 14 | YEAR=`echo $DATE | awk -F- '{print $3}'` |
| 15 | |
Theodore Ts'o | 40fa8cc | 1999-01-09 05:06:02 +0000 | [diff] [blame] | 16 | if expr $YEAR ">" 1900 > /dev/null ; then |
| 17 | E2FSPROGS_YEAR=$YEAR |
| 18 | elif expr $YEAR ">" 90 >/dev/null ; then |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 19 | E2FSPROGS_YEAR=19$YEAR |
| 20 | else |
| 21 | E2FSPROGS_YEAR=20$YEAR |
| 22 | fi |
| 23 | |
| 24 | case $MONTH in |
| 25 | Jan) E2FSPROGS_MONTH="January" ;; |
| 26 | Feb) E2FSPROGS_MONTH="February" ;; |
| 27 | Mar) E2FSPROGS_MONTH="March" ;; |
| 28 | Apr) E2FSPROGS_MONTH="April" ;; |
| 29 | May) E2FSPROGS_MONTH="May" ;; |
| 30 | Jun) E2FSPROGS_MONTH="June" ;; |
| 31 | Jul) E2FSPROGS_MONTH="July" ;; |
| 32 | Aug) E2FSPROGS_MONTH="August" ;; |
| 33 | Sep) E2FSPROGS_MONTH="September" ;; |
| 34 | Oct) E2FSPROGS_MONTH="October" ;; |
| 35 | Nov) E2FSPROGS_MONTH="November" ;; |
| 36 | Dec) E2FSPROGS_MONTH="December" ;; |
| 37 | *) echo "Unknown month $MONTH??" ;; |
| 38 | esac |
| 39 | |
| 40 | unset DATE MONTH YEAR |
| 41 | echo "Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION" |
| 42 | echo "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}" |
| 43 | AC_SUBST(E2FSPROGS_YEAR) |
| 44 | AC_SUBST(E2FSPROGS_MONTH) |
| 45 | AC_SUBST(E2FSPROGS_VERSION) |
Theodore Ts'o | ea97be5 | 2001-09-19 15:20:12 -0400 | [diff] [blame] | 46 | AC_CANONICAL_HOST |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 47 | dnl |
| 48 | dnl set $(CC) from --with-cc=value |
| 49 | dnl |
| 50 | AC_ARG_WITH([cc], |
| 51 | [ --with-cc=COMPILER select compiler to use], |
| 52 | AC_MSG_RESULT(CC=$withval) |
| 53 | CC=$withval, |
| 54 | if test -z "$CC" ; then CC=cc; fi |
| 55 | [AC_MSG_RESULT(CC defaults to $CC)])dnl |
| 56 | export CC |
| 57 | AC_SUBST([CC]) |
Theodore Ts'o | 73ae2d4 | 2000-02-02 16:13:14 +0000 | [diff] [blame] | 58 | AC_PROG_CC |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 59 | dnl |
| 60 | dnl set $(LD) from --with-linker=value |
| 61 | dnl |
| 62 | AC_ARG_WITH([linker], |
| 63 | [ --with-linker=LINKER select linker to use], |
| 64 | AC_MSG_RESULT(LD=$withval) |
| 65 | LD=$withval, |
| 66 | if test -z "$LD" ; then LD=$CC; fi |
| 67 | [AC_MSG_RESULT(LD defaults to $LD)])dnl |
| 68 | export LD |
| 69 | AC_SUBST([LD]) |
| 70 | dnl |
| 71 | dnl set $(CCOPTS) from --with-ccopts=value |
| 72 | dnl |
| 73 | AC_ARG_WITH([ccopts], |
| 74 | [ --with-ccopts=CCOPTS select compiler command line options], |
| 75 | AC_MSG_RESULT(CCOPTS is $withval) |
Theodore Ts'o | 877eb6d | 2001-06-11 06:54:13 +0000 | [diff] [blame] | 76 | CFLAGS=$withval, |
| 77 | )dnl |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 78 | dnl |
Theodore Ts'o | f8bd980 | 1999-10-26 04:19:45 +0000 | [diff] [blame] | 79 | dnl On systems without linux header files, we add an extra include directory |
| 80 | dnl that holds enough to fake it (hopefully). Note that the $(top_srcdir) here |
| 81 | dnl is quoted so that it gets expanded by make, not by configure. |
| 82 | dnl |
| 83 | AC_CHECK_HEADER(linux/fs.h, [linux_headers=yes], [linux_headers=no]) |
Theodore Ts'o | 73ae2d4 | 2000-02-02 16:13:14 +0000 | [diff] [blame] | 84 | if test "$linux_headers" != yes; then |
| 85 | LINUX_INCLUDE='-I$(top_builddir)/include' |
Theodore Ts'o | f8bd980 | 1999-10-26 04:19:45 +0000 | [diff] [blame] | 86 | fi |
| 87 | AC_SUBST(LINUX_INCLUDE) |
| 88 | dnl |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 89 | dnl Set default values for library extentions. Will be dealt with after |
| 90 | dnl parsing configuration opions, which may modify these |
| 91 | dnl |
| 92 | LIB_EXT=.a |
| 93 | STATIC_LIB_EXT=.a |
| 94 | PROFILE_LIB_EXT=.a |
| 95 | dnl |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 96 | dnl set $(LDFLAGS) from --with-ldopts=value |
| 97 | dnl |
| 98 | AC_ARG_WITH([ldopts], |
| 99 | [ --with-ldopts=LDOPTS select linker command line options], |
| 100 | AC_MSG_RESULT(LDFLAGS is $withval) |
| 101 | LDFLAGS=$withval, |
| 102 | LDFLAGS=)dnl |
| 103 | AC_SUBST(LDFLAGS) |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 104 | dnl |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 105 | dnl Allow separate `root_prefix' to be specified |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 106 | dnl |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 107 | AC_ARG_WITH([root-prefix], |
| 108 | [ --with-root-prefix=PREFIX override prefix variable for files to be placed in the root], |
| 109 | root_prefix=$withval, |
| 110 | root_prefix=NONE)dnl |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 111 | dnl |
Theodore Ts'o | 1917875 | 2000-02-11 15:55:07 +0000 | [diff] [blame] | 112 | dnl handle --enable-compression |
| 113 | dnl |
| 114 | AC_ARG_ENABLE([compression], |
| 115 | [ --enable-compression enable EXPERIMENTAL compression support], |
| 116 | if test "$enableval" = "no" |
| 117 | then |
| 118 | echo "Disabling compression support" |
| 119 | else |
| 120 | AC_DEFINE(ENABLE_COMPRESSION) |
| 121 | echo "Enabling compression support" |
| 122 | echo "WARNING: Compression support is experimental" |
| 123 | fi |
| 124 | , |
| 125 | echo "Disabling compression support by default" |
| 126 | ) |
| 127 | dnl |
Theodore Ts'o | 8fdc998 | 2002-06-25 23:26:34 -0400 | [diff] [blame] | 128 | dnl handle --enable-htree |
| 129 | dnl |
| 130 | AC_ARG_ENABLE([htree], |
| 131 | [ --enable-htree enable EXPERIMENTAL htree directory support], |
| 132 | if test "$enableval" = "no" |
| 133 | then |
| 134 | HTREE_CMT=# |
| 135 | echo "Disabling htree directory support" |
| 136 | else |
| 137 | HTREE_CMT= |
| 138 | AC_DEFINE(ENABLE_HTREE) |
| 139 | echo "Enabling htree directory support" |
Theodore Ts'o | 8fdc998 | 2002-06-25 23:26:34 -0400 | [diff] [blame] | 140 | fi |
| 141 | , |
Theodore Ts'o | 559ca6c | 2002-08-18 03:48:55 -0400 | [diff] [blame] | 142 | HTREE_CMT= |
| 143 | AC_DEFINE(ENABLE_HTREE) |
| 144 | echo "Enabling htree directory support by default" |
Theodore Ts'o | 8fdc998 | 2002-06-25 23:26:34 -0400 | [diff] [blame] | 145 | ) |
| 146 | AC_SUBST(HTREE_CMT) |
| 147 | dnl |
| 148 | dnl handle --enable-clear-htree |
| 149 | dnl |
| 150 | AC_ARG_ENABLE([htree-clear], |
| 151 | [ --enable-htree-clear clear htree because we don't trust e2fsck], |
| 152 | if test "$enableval" = "no" |
| 153 | then |
| 154 | HTREE_CLR_CMT=# |
| 155 | echo "Disabling htree clearing" |
| 156 | else |
| 157 | HTREE_CLR_CMT= |
| 158 | AC_DEFINE(ENABLE_HTREE_CLEAR) |
| 159 | echo "Enabling htree clearing" |
| 160 | fi |
| 161 | , |
| 162 | HTREE_CLR_CMT=# |
| 163 | echo "Disabling htree clearing by default" |
| 164 | ) |
| 165 | AC_SUBST(HTREE_CLR_CMT) |
| 166 | dnl |
Theodore Ts'o | a9d799a | 2002-11-08 13:50:51 -0500 | [diff] [blame] | 167 | dnl handle --enable-emvs-10 |
Theodore Ts'o | ff6dbcc | 2002-05-24 22:44:42 -0400 | [diff] [blame] | 168 | dnl |
Theodore Ts'o | a9d799a | 2002-11-08 13:50:51 -0500 | [diff] [blame] | 169 | EVMS_ABI_CODE=120 |
| 170 | AC_ARG_ENABLE([evms-10], |
| 171 | [ --enable-evms-10 use EVMS 1.0 ABI (instead of EVMS 1.2)], |
| 172 | if test "$enableval" != "no" |
Theodore Ts'o | ff6dbcc | 2002-05-24 22:44:42 -0400 | [diff] [blame] | 173 | then |
Theodore Ts'o | a9d799a | 2002-11-08 13:50:51 -0500 | [diff] [blame] | 174 | EVMS_ABI_CODE=100 |
Theodore Ts'o | ff6dbcc | 2002-05-24 22:44:42 -0400 | [diff] [blame] | 175 | echo "Enabling EVMS 1.0.0 ABI" |
| 176 | fi |
Theodore Ts'o | ff6dbcc | 2002-05-24 22:44:42 -0400 | [diff] [blame] | 177 | ) |
| 178 | dnl |
Theodore Ts'o | a9d799a | 2002-11-08 13:50:51 -0500 | [diff] [blame] | 179 | dnl handle --enable-emvs-11 |
| 180 | dnl |
| 181 | AC_ARG_ENABLE([evms-11], |
| 182 | [ --enable-evms-11 use EVMS 1.1 ABI (instead of EVMS 1.1)], |
| 183 | if test "$enableval" != "no" |
| 184 | then |
| 185 | EVMS_ABI_CODE=110 |
| 186 | echo "Enabling EVMS 1.1.0 ABI" |
| 187 | fi |
| 188 | ) |
| 189 | if test "$EVMS_ABI_CODE" = "120" |
| 190 | then |
| 191 | echo "Using EVMS 1.2.0 ABI by default" |
| 192 | fi |
| 193 | AC_SUBST(EVMS_ABI_CODE) |
| 194 | dnl |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 195 | dnl handle --enable-dll-shlibs |
| 196 | dnl |
| 197 | AC_ARG_ENABLE([dll-shlibs], |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 198 | [ --enable-dll-shlibs select DLL libraries], |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 199 | if test "$enableval" = "no" |
| 200 | then |
| 201 | DLL_CMT=# |
| 202 | MAKEFILE_DLL=/dev/null |
| 203 | echo "Disabling DLL shared libraries" |
| 204 | else |
| 205 | DLL_CMT= |
| 206 | MAKEFILE_DLL=$srcdir/lib/Makefile.dll-lib |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 207 | BINARY_TYPE=dllbin |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 208 | LIB_EXT=.sa |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 209 | echo "Enabling DLL shared libraries" |
| 210 | fi |
| 211 | , |
| 212 | MAKEFILE_DLL=/dev/null |
| 213 | DLL_CMT=# |
| 214 | echo "Disabling DLL shared libraries by default" |
| 215 | ) |
| 216 | AC_SUBST(DLL_CMT) |
| 217 | AC_SUBST_FILE(MAKEFILE_DLL) |
| 218 | dnl |
| 219 | dnl handle --enable-elf-shlibs |
| 220 | dnl |
| 221 | AC_ARG_ENABLE([elf-shlibs], |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 222 | [ --enable-elf-shlibs select ELF shared libraries], |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 223 | if test "$enableval" = "no" |
| 224 | then |
| 225 | ELF_CMT=# |
| 226 | MAKEFILE_ELF=/dev/null |
| 227 | echo "Disabling ELF shared libraries" |
| 228 | else |
| 229 | ELF_CMT= |
| 230 | MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib |
Theodore Ts'o | f5955dd | 2000-10-25 02:38:39 +0000 | [diff] [blame] | 231 | [case "$host_os" in |
| 232 | solaris2.*) |
| 233 | MAKEFILE_ELF=$srcdir/lib/Makefile.solaris-lib |
| 234 | ;; |
| 235 | esac] |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 236 | BINARY_TYPE=elfbin |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 237 | LIB_EXT=.so |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 238 | echo "Enabling ELF shared libraries" |
| 239 | fi |
| 240 | , |
| 241 | MAKEFILE_ELF=/dev/null |
| 242 | ELF_CMT=# |
| 243 | echo "Disabling ELF shared libraries by default" |
| 244 | ) |
| 245 | AC_SUBST(ELF_CMT) |
| 246 | AC_SUBST_FILE(MAKEFILE_ELF) |
| 247 | dnl |
| 248 | dnl handle --enable-bsd-shlibs |
| 249 | dnl |
| 250 | AC_ARG_ENABLE([bsd-shlibs], |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 251 | [ --enable-bsd-shlibs select BSD shared libraries], |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 252 | if test "$enableval" = "no" |
| 253 | then |
| 254 | BSDLIB_CMT=# |
| 255 | MAKEFILE_BSDLIB=/dev/null |
| 256 | echo "Disabling BSD shared libraries" |
| 257 | else |
| 258 | BSDLIB_CMT= |
| 259 | MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 260 | LIB_EXT=.so |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 261 | echo "Enabling BSD shared libraries" |
| 262 | fi |
| 263 | , |
| 264 | MAKEFILE_BSDLIB=/dev/null |
| 265 | BSDLIB_CMT=# |
| 266 | echo "Disabling BSD shared libraries by default" |
| 267 | ) |
| 268 | AC_SUBST(BSDLIB_CMT) |
| 269 | AC_SUBST_FILE(MAKEFILE_BSDLIB) |
| 270 | dnl |
| 271 | dnl handle --enable-profile |
| 272 | dnl |
| 273 | AC_ARG_ENABLE([profile], |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 274 | [ --enable-profile build profiling libraries], |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 275 | if test "$enableval" = "no" |
| 276 | then |
| 277 | PROFILE_CMT=# |
| 278 | MAKEFILE_PROFILE=/dev/null |
| 279 | echo "Disabling profiling libraries" |
| 280 | else |
| 281 | PROFILE_CMT= |
| 282 | MAKEFILE_PROFILE=$srcdir/lib/Makefile.profile |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 283 | PROFILED_LIB_EXT=_p.a |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 284 | echo "Building profiling libraries" |
| 285 | fi |
| 286 | , |
| 287 | PROFILE_CMT=# |
| 288 | MAKEFILE_PROFILE=/dev/null |
| 289 | echo "Disabling profiling libraries by default" |
| 290 | ) |
| 291 | AC_SUBST(PROFILE_CMT) |
| 292 | AC_SUBST_FILE(MAKEFILE_PROFILE) |
| 293 | dnl |
| 294 | dnl handle --enable-checker |
| 295 | dnl |
| 296 | AC_ARG_ENABLE([checker], |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 297 | [ --enable-checker build checker libraries], |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 298 | if test "$enableval" = "no" |
| 299 | then |
| 300 | CHECKER_CMT=# |
| 301 | MAKEFILE_CHECKER=/dev/null |
| 302 | echo "Disabling checker libraries" |
| 303 | else |
| 304 | CHECKER_CMT= |
| 305 | MAKEFILE_CHECKER=$srcdir/lib/Makefile.checker |
| 306 | echo "Building checker libraries" |
| 307 | fi |
| 308 | , |
| 309 | CHECKER_CMT=# |
| 310 | MAKEFILE_CHECKER=/dev/null |
| 311 | echo "Disabling checker libraries by default" |
| 312 | ) |
| 313 | AC_SUBST(CHECKER_CMT) |
| 314 | AC_SUBST_FILE(MAKEFILE_CHECKER) |
| 315 | dnl |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 316 | dnl Substitute library extensions |
| 317 | dnl |
| 318 | AC_SUBST(LIB_EXT) |
| 319 | AC_SUBST(STATIC_LIB_EXT) |
| 320 | AC_SUBST(PROFILED_LIB_EXT) |
| 321 | dnl |
Theodore Ts'o | 782bebf | 2002-11-08 18:46:45 -0500 | [diff] [blame] | 322 | dnl handle --enable-jbd-debug |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 323 | dnl |
Theodore Ts'o | 782bebf | 2002-11-08 18:46:45 -0500 | [diff] [blame] | 324 | AC_ARG_ENABLE([jbd-debug], |
| 325 | [ --enable-jbd-debug enable journal debugging], |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 326 | if test "$enableval" = "no" |
| 327 | then |
| 328 | echo "Disabling journal debugging" |
| 329 | else |
Theodore Ts'o | 8cf9333 | 2001-12-16 02:23:36 -0500 | [diff] [blame] | 330 | AC_DEFINE(CONFIG_JBD_DEBUG) |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 331 | echo "Enabling journal debugging" |
| 332 | fi |
| 333 | , |
| 334 | echo "Disabling journal debugging by default" |
| 335 | ) |
| 336 | dnl |
| 337 | dnl handle --enable-swapfs |
| 338 | dnl |
| 339 | AC_ARG_ENABLE([swapfs], |
| 340 | [ --disable-swapfs disable support of legacy byte-swapped filesystems], |
| 341 | if test "$enableval" = "no" |
| 342 | then |
Theodore Ts'o | feb44c6 | 2002-11-08 14:55:38 -0500 | [diff] [blame] | 343 | SWAPFS_CMT=# |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 344 | echo "Disabling swapfs support" |
| 345 | else |
Theodore Ts'o | feb44c6 | 2002-11-08 14:55:38 -0500 | [diff] [blame] | 346 | SWAPFS_CMT= |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 347 | AC_DEFINE(ENABLE_SWAPFS) |
| 348 | echo "Enabling swapfs support" |
| 349 | fi |
| 350 | , |
Theodore Ts'o | feb44c6 | 2002-11-08 14:55:38 -0500 | [diff] [blame] | 351 | SWAPFS_CMT= |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 352 | echo "Enabling swapfs support by default" |
| 353 | AC_DEFINE(ENABLE_SWAPFS) |
| 354 | ) |
Theodore Ts'o | feb44c6 | 2002-11-08 14:55:38 -0500 | [diff] [blame] | 355 | AC_SUBST(SWAPFS_CMT) |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 356 | dnl |
| 357 | dnl handle --enable-debugfs |
| 358 | dnl |
| 359 | AC_ARG_ENABLE([debugfs], |
| 360 | [ --disable-debugfs disable support of debugfs program], |
| 361 | if test "$enableval" = "no" |
| 362 | then |
| 363 | echo "Disabling debugfs support" |
| 364 | DEBUGFS_CMT="#" |
| 365 | else |
| 366 | DEBUGFS_CMT= |
| 367 | echo "Enabling debugfs support" |
| 368 | fi |
| 369 | , |
| 370 | echo "Enabling debugfs support by default" |
| 371 | DEBUGFS_CMT= |
| 372 | ) |
| 373 | AC_SUBST(DEBUGFS_CMT) |
| 374 | dnl |
| 375 | dnl handle --enable-imager |
| 376 | dnl |
| 377 | AC_ARG_ENABLE([imager], |
| 378 | [ --disable-imager disable support of e2image program], |
| 379 | if test "$enableval" = "no" |
| 380 | then |
| 381 | echo "Disabling e2image support" |
| 382 | IMAGER_CMT="#" |
| 383 | else |
| 384 | IMAGER_CMT= |
| 385 | echo "Enabling e2image support" |
| 386 | fi |
| 387 | , |
| 388 | echo "Enabling e2image support by default" |
| 389 | IMAGER_CMT= |
| 390 | ) |
| 391 | AC_SUBST(IMAGER_CMT) |
| 392 | dnl |
| 393 | dnl handle --enable-resizer |
| 394 | dnl |
| 395 | AC_ARG_ENABLE([resizer], |
| 396 | [ --disable-resizer disable support of e2resize program], |
| 397 | if test "$enableval" = "no" |
| 398 | then |
| 399 | echo "Disabling e2resize support" |
| 400 | RESIZER_CMT="#" |
| 401 | else |
| 402 | RESIZER_CMT= |
| 403 | echo "Enabling e2resize support" |
| 404 | fi |
| 405 | , |
| 406 | echo "Enabling e2resize support by default" |
| 407 | RESIZER_CMT= |
| 408 | ) |
| 409 | AC_SUBST(RESIZER_CMT) |
| 410 | dnl |
Theodore Ts'o | 4d0f3e1 | 2001-01-11 15:48:50 +0000 | [diff] [blame] | 411 | dnl handle --enable-dynamic-e2fsck |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 412 | dnl |
Theodore Ts'o | a4d0961 | 1997-04-29 14:28:00 +0000 | [diff] [blame] | 413 | AC_ARG_ENABLE([dynamic-e2fsck], |
| 414 | [ --enable-dynamic-e2fsck build e2fsck dynamically], |
| 415 | if test "$enableval" = "no" |
| 416 | then |
| 417 | E2FSCK_TYPE=static |
| 418 | echo "Building e2fsck statically" |
| 419 | else |
| 420 | E2FSCK_TYPE=shared |
| 421 | echo "Building e2fsck dynamically" |
| 422 | fi |
| 423 | , |
| 424 | E2FSCK_TYPE=static |
| 425 | echo "Building e2fsck statically by default" |
| 426 | ) |
| 427 | AC_SUBST(E2FSCK_TYPE) |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 428 | dnl |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 429 | dnl See whether to install the `fsck' wrapper program (that calls e2fsck) |
| 430 | dnl |
| 431 | AC_ARG_ENABLE([fsck], |
| 432 | [ --enable-fsck build fsck wrapper program], |
| 433 | [if test "$enableval" = "no" |
| 434 | then |
| 435 | FSCK_PROG='' FSCK_MAN='' |
| 436 | echo "Not building fsck wrapper" |
| 437 | else |
| 438 | FSCK_PROG=fsck FSCK_MAN=fsck.8 |
| 439 | echo "Building fsck wrapper" |
| 440 | fi] |
| 441 | , |
| 442 | [case "$host_os" in |
| 443 | gnu*) |
| 444 | FSCK_PROG='' FSCK_MAN='' |
| 445 | echo "Not building fsck wrapper by default" |
| 446 | ;; |
| 447 | *) |
| 448 | FSCK_PROG=fsck FSCK_MAN=fsck.8 |
| 449 | echo "Building fsck wrapper by default" |
| 450 | esac] |
| 451 | ) |
| 452 | AC_SUBST(FSCK_PROG) |
| 453 | AC_SUBST(FSCK_MAN) |
| 454 | dnl |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 455 | dnl |
| 456 | MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library |
| 457 | AC_SUBST_FILE(MAKEFILE_LIBRARY) |
| 458 | dnl |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 459 | dnl |
| 460 | AC_ARG_ENABLE([old-bitops], |
| 461 | [ --enable-old-bitops Use old (non-standard but native) bitmask operations], |
| 462 | if test "$enableval" = "no" |
| 463 | then |
| 464 | echo "Using new (standard) bitmask operations" |
| 465 | else |
| 466 | AC_DEFINE(EXT2_OLD_BITOPS) |
| 467 | echo "Using old (native) bitmask operations" |
| 468 | |
| 469 | fi |
| 470 | , |
| 471 | echo "Using standard bitmask operations by default" |
| 472 | ) |
| 473 | dnl |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 474 | dnl Add internationalization support, using gettext. |
| 475 | dnl |
| 476 | PACKAGE=e2fsprogs |
| 477 | VERSION="$E2FSPROGS_VERSION" |
| 478 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") |
| 479 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION") |
| 480 | AC_SUBST(PACKAGE) |
| 481 | AC_SUBST(VERSION) |
| 482 | |
Theodore Ts'o | 0c897a9 | 2002-11-09 12:01:18 -0500 | [diff] [blame^] | 483 | ALL_LINGUAS="it nyc tr de de-utf" |
Theodore Ts'o | cdf186e | 2001-06-13 22:16:47 +0000 | [diff] [blame] | 484 | AM_GNU_GETTEXT |
| 485 | dnl |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 486 | dnl End of configuration options |
| 487 | dnl |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 488 | AC_SUBST(BINARY_TYPE) |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 489 | AC_PROG_MAKE_SET |
| 490 | AC_PATH_PROG(LN, ln, ln) |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 491 | AC_PROG_LN_S |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 492 | AC_PATH_PROG(MV, mv, mv) |
| 493 | AC_PATH_PROG(CP, cp, cp) |
| 494 | AC_PATH_PROG(RM, rm, rm) |
| 495 | AC_PATH_PROG(CHMOD, chmod, :) |
| 496 | AC_PATH_PROG(AWK, awk, awk) |
| 497 | AC_PATH_PROG(SED, sed, sed) |
Theodore Ts'o | 9d564f7 | 1999-07-03 20:25:58 +0000 | [diff] [blame] | 498 | AC_PATH_PROG(PERL, perl, perl) |
Theodore Ts'o | 250f79f | 2001-05-19 22:02:22 +0000 | [diff] [blame] | 499 | AC_PATH_PROG(LDCONFIG, ldconfig, :) |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 500 | AC_CHECK_TOOL(AR, ar, ar) |
| 501 | AC_CHECK_TOOL(RANLIB, ranlib, :) |
| 502 | AC_CHECK_TOOL(STRIP, strip, :) |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 503 | AC_PROG_INSTALL |
Theodore Ts'o | 6c13352 | 1999-07-03 20:37:03 +0000 | [diff] [blame] | 504 | # See if we need a separate native compiler. |
| 505 | if test $cross_compiling = no; then |
| 506 | BUILD_CC="$CC" |
| 507 | AC_SUBST(BUILD_CC) |
| 508 | else |
| 509 | AC_CHECK_PROGS(BUILD_CC, gcc cc) |
| 510 | fi |
Theodore Ts'o | 31e29a1 | 2002-05-17 10:53:07 -0400 | [diff] [blame] | 511 | AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h termios.h linux/fd.h linux/major.h sys/disklabel.h sys/ioctl.h sys/mkdev.h sys/mount.h sys/sockio.h sys/sysmacros.h sys/time.h sys/stat.h sys/types.h net/if.h netinet/in.h) |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 512 | AC_FUNC_VPRINTF |
| 513 | dnl |
Theodore Ts'o | b0b9c4d | 1997-10-20 23:36:30 +0000 | [diff] [blame] | 514 | dnl Check to see if llseek() is declared in unistd.h. On some libc's |
| 515 | dnl it is, and on others it isn't..... Thank you glibc developers.... |
| 516 | dnl |
| 517 | dnl Warning! Use of --enable-gcc-wall may throw off this test. |
| 518 | dnl |
| 519 | dnl |
| 520 | AC_MSG_CHECKING(whether llseek declared in unistd.h) |
| 521 | AC_CACHE_VAL(e2fsprogs_cv_have_llseek_prototype, |
| 522 | AC_TRY_COMPILE( |
| 523 | [#include <unistd.h>], [extern int llseek(int);], |
| 524 | [e2fsprogs_cv_have_llseek_prototype=no], |
| 525 | [e2fsprogs_cv_have_llseek_prototype=yes])) |
| 526 | AC_MSG_RESULT($e2fsprogs_cv_have_llseek_prototype) |
| 527 | if test "$e2fsprogs_cv_have_llseek_prototype" = yes; then |
| 528 | AC_DEFINE(HAVE_LLSEEK_PROTOTYPE) |
| 529 | fi |
| 530 | dnl |
Theodore Ts'o | 6928adc | 2000-05-25 23:28:50 +0000 | [diff] [blame] | 531 | dnl Check to see if lseek64() is declared in unistd.h. Glibc's header files |
| 532 | dnl are so convoluted that I can't tell whether it will always be defined, |
| 533 | dnl and if it isn't defined while lseek64 is defined in the library, |
| 534 | dnl disaster will strike. |
| 535 | dnl |
| 536 | dnl Warning! Use of --enable-gcc-wall may throw off this test. |
| 537 | dnl |
| 538 | dnl |
| 539 | AC_MSG_CHECKING(whether lseek64 declared in unistd.h) |
| 540 | AC_CACHE_VAL(e2fsprogs_cv_have_lseek64_prototype, |
| 541 | AC_TRY_COMPILE( |
| 542 | [#define _LARGEFILE_SOURCE |
| 543 | #define _LARGEFILE64_SOURCE |
| 544 | #include <unistd.h>], [extern int lseek64(int);], |
| 545 | [e2fsprogs_cv_have_lseek64_prototype=no], |
| 546 | [e2fsprogs_cv_have_lseek64_prototype=yes])) |
| 547 | AC_MSG_RESULT($e2fsprogs_cv_have_lseek64_prototype) |
| 548 | if test "$e2fsprogs_cv_have_lseek64_prototype" = yes; then |
| 549 | AC_DEFINE(HAVE_LSEEK64_PROTOTYPE) |
| 550 | fi |
| 551 | dnl |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 552 | dnl Word sizes... |
| 553 | dnl |
| 554 | if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then |
| 555 | # if cross-compiling, with no cached values, just assume something common. |
| 556 | ac_cv_sizeof_short=2 |
| 557 | ac_cv_sizeof_int=4 |
| 558 | ac_cv_sizeof_long=4 |
Theodore Ts'o | 6c13352 | 1999-07-03 20:37:03 +0000 | [diff] [blame] | 559 | ac_cv_sizeof_long_long=8 |
| 560 | AC_MSG_WARN([Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8]) |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 561 | fi |
| 562 | AC_CHECK_SIZEOF(short) |
| 563 | AC_CHECK_SIZEOF(int) |
| 564 | AC_CHECK_SIZEOF(long) |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 565 | AC_CHECK_SIZEOF(long long) |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 566 | SIZEOF_SHORT=$ac_cv_sizeof_short |
| 567 | SIZEOF_INT=$ac_cv_sizeof_int |
| 568 | SIZEOF_LONG=$ac_cv_sizeof_long |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 569 | SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 570 | AC_SUBST(SIZEOF_SHORT) |
| 571 | AC_SUBST(SIZEOF_INT) |
| 572 | AC_SUBST(SIZEOF_LONG) |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 573 | AC_SUBST(SIZEOF_LONG_LONG) |
Theodore Ts'o | 877eb6d | 2001-06-11 06:54:13 +0000 | [diff] [blame] | 574 | AC_C_BIGENDIAN |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 575 | dnl |
| 576 | dnl See if struct stat has a st_flags field, in which case we can get file |
| 577 | dnl flags somewhat portably. Also check for the analogous setter, chflags(). |
| 578 | dnl |
| 579 | AC_MSG_CHECKING(whether struct stat has a st_flags field) |
| 580 | AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags, |
| 581 | AC_TRY_COMPILE([#include <sys/stat.h>], |
| 582 | [struct stat stat; stat.st_flags = 0;], |
| 583 | [e2fsprogs_cv_struct_st_flags=yes], |
| 584 | [e2fsprogs_cv_struct_st_flags=no])) |
| 585 | AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags) |
| 586 | if test "$e2fsprogs_cv_struct_st_flags" = yes; then |
Theodore Ts'o | c03bc4e | 1999-10-20 18:20:36 +0000 | [diff] [blame] | 587 | AC_MSG_CHECKING(whether st_flags field is useful) |
| 588 | AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags_immut, |
| 589 | AC_TRY_COMPILE([#include <sys/stat.h>], |
| 590 | [struct stat stat; stat.st_flags |= UF_IMMUTABLE;], |
| 591 | [e2fsprogs_cv_struct_st_flags_immut=yes], |
| 592 | [e2fsprogs_cv_struct_st_flags_immut=no])) |
| 593 | AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags_immut) |
| 594 | if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then |
| 595 | AC_DEFINE(HAVE_STAT_FLAGS) |
| 596 | fi |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 597 | fi |
Theodore Ts'o | 593c6ea | 2002-07-14 15:58:38 -0400 | [diff] [blame] | 598 | AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 getmntinfo strcasecmp srandom fchown mallinfo fdatasync strnlen sysconf pathconf) |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 599 | dnl |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 600 | dnl Check to see if -lsocket is required (solaris) to make something |
| 601 | dnl that uses socket() to compile; this is needed for the UUID library |
| 602 | dnl |
| 603 | SOCKET_LIB='' |
| 604 | AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket]) |
| 605 | AC_SUBST(SOCKET_LIB) |
| 606 | dnl |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 607 | dnl See if optreset exists |
| 608 | dnl |
| 609 | AC_MSG_CHECKING(for optreset) |
| 610 | AC_CACHE_VAL(ac_cv_have_optreset, |
| 611 | [AC_EGREP_HEADER(optreset, unistd.h, |
| 612 | ac_cv_have_optreset=yes, ac_cv_have_optreset=no)])dnl |
| 613 | AC_MSG_RESULT($ac_cv_have_optreset) |
| 614 | if test $ac_cv_have_optreset = yes; then |
| 615 | AC_DEFINE(HAVE_OPTRESET) |
| 616 | fi |
| 617 | dnl |
Theodore Ts'o | 8f3f29d | 2000-02-11 05:04:44 +0000 | [diff] [blame] | 618 | dnl We use the EXT2 ioctls only under Linux |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 619 | dnl |
Theodore Ts'o | 8f3f29d | 2000-02-11 05:04:44 +0000 | [diff] [blame] | 620 | case "$host_os" in |
| 621 | linux*) |
| 622 | AC_DEFINE(HAVE_EXT2_IOCTLS) |
| 623 | ;; |
| 624 | esac |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 625 | dnl |
Theodore Ts'o | e6f2bda | 2002-08-18 03:37:10 -0400 | [diff] [blame] | 626 | dnl Uncomment only if Linux |
| 627 | dnl |
| 628 | LINUX_CMT="#" |
| 629 | case "$host_os" in |
| 630 | linux*) |
| 631 | LINUX_CMT= |
| 632 | ;; |
| 633 | esac |
| 634 | AC_SUBST(LINUX_CMT) |
| 635 | dnl |
Theodore Ts'o | 6c13352 | 1999-07-03 20:37:03 +0000 | [diff] [blame] | 636 | dnl Linux and Hurd places root files in the / by default |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 637 | dnl |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 638 | case "$host_os" in |
Theodore Ts'o | 6c13352 | 1999-07-03 20:37:03 +0000 | [diff] [blame] | 639 | linux* | gnu*) |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 640 | if test "$prefix" = NONE -a "$root_prefix" = NONE ; then |
| 641 | root_prefix=""; |
| 642 | echo "On $host_os systems, root_prefix defaults to ''" |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 643 | fi |
| 644 | ;; |
| 645 | esac |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 646 | dnl |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 647 | dnl On Linux/hurd, force the prefix to be /usr |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 648 | dnl |
| 649 | case "$host_os" in |
| 650 | linux* | gnu*) |
| 651 | if test "$prefix" = NONE ; then |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 652 | prefix="/usr"; |
| 653 | echo "On $host_os systems, prefix defaults to /usr" |
Theodore Ts'o | bff61a7 | 2002-05-21 22:21:38 -0400 | [diff] [blame] | 654 | if test "$mandir" = '${prefix}/man' ; then |
| 655 | echo "...and mandir defaults to /usr/share/man" |
| 656 | mandir=/usr/share/man |
| 657 | fi |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 658 | fi |
| 659 | ;; |
| 660 | esac |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 661 | if test "$root_prefix" = NONE ; then |
Theodore Ts'o | ffe1991 | 1998-04-08 06:05:49 +0000 | [diff] [blame] | 662 | if test "$prefix" = NONE ; then |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 663 | root_prefix="$ac_default_prefix" |
| 664 | else |
| 665 | root_prefix="$prefix" |
| 666 | fi |
Theodore Ts'o | b5ffead | 2002-05-11 19:17:00 -0400 | [diff] [blame] | 667 | root_bindir=$bindir |
| 668 | root_sbindir=$sbindir |
| 669 | root_libdir=$libdir |
| 670 | root_sysconfdir=$sysconfdir |
| 671 | else |
| 672 | root_bindir='${root_prefix}/bin' |
| 673 | root_sbindir='${root_prefix}/sbin' |
| 674 | root_libdir='${root_prefix}/lib' |
| 675 | root_sysconfdir='${root_prefix}/etc' |
Theodore Ts'o | a4b2d3c | 1998-04-03 16:12:25 +0000 | [diff] [blame] | 676 | fi |
| 677 | AC_SUBST(root_prefix) |
Theodore Ts'o | b5ffead | 2002-05-11 19:17:00 -0400 | [diff] [blame] | 678 | AC_SUBST(root_bindir) |
| 679 | AC_SUBST(root_sbindir) |
| 680 | AC_SUBST(root_libdir) |
| 681 | AC_SUBST(root_sysconfdir) |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 682 | dnl |
| 683 | dnl See if -static works. |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 684 | dnl |
Theodore Ts'o | ae85148 | 1997-04-29 18:13:24 +0000 | [diff] [blame] | 685 | AC_MSG_CHECKING([whether linker accepts -static]) |
| 686 | AC_CACHE_VAL(ac_cv_e2fsprogs_use_static, |
| 687 | [SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static" |
| 688 | AC_TRY_LINK([#include <stdio.h>],[fflush(stdout);], |
| 689 | ac_cv_e2fsprogs_use_static=yes, ac_cv_e2fsprogs_use_static=no) |
| 690 | LDFLAGS=$SAVE_LDFLAGS]) |
Theodore Ts'o | defde78 | 1999-01-04 07:39:19 +0000 | [diff] [blame] | 691 | dnl |
| 692 | dnl Regardless of how the test turns out, Solaris doesn't handle -static |
| 693 | dnl This is caused by the socket library requiring the nsl library, which |
| 694 | dnl requires the -dl library, which only works for dynamically linked |
| 695 | dnl programs. It basically means you can't have statically linked programs |
| 696 | dnl which use the network under Solaris. |
| 697 | dnl |
| 698 | case "$host_os" in |
| 699 | solaris2.*) |
| 700 | ac_cv_e2fsprogs_use_static=no |
| 701 | ;; |
| 702 | esac |
Theodore Ts'o | ae85148 | 1997-04-29 18:13:24 +0000 | [diff] [blame] | 703 | AC_MSG_RESULT($ac_cv_e2fsprogs_use_static) |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 704 | LDFLAG_STATIC= |
Theodore Ts'o | ae85148 | 1997-04-29 18:13:24 +0000 | [diff] [blame] | 705 | if test $ac_cv_e2fsprogs_use_static = yes; then |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 706 | LDFLAG_STATIC=-static |
Theodore Ts'o | ae85148 | 1997-04-29 18:13:24 +0000 | [diff] [blame] | 707 | fi |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 708 | AC_SUBST(LDFLAG_STATIC) |
| 709 | dnl |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 710 | dnl Make the ss and et directories work correctly. |
| 711 | dnl |
| 712 | SS_DIR=`cd ${srcdir}/lib/ss; pwd` |
| 713 | ET_DIR=`cd ${srcdir}/lib/et; pwd` |
| 714 | AC_SUBST(SS_DIR) |
| 715 | AC_SUBST(ET_DIR) |
| 716 | dnl |
| 717 | dnl Only try to run the test suite if we're not cross compiling. |
| 718 | dnl |
| 719 | if test "$cross_compiling" = yes ; then |
| 720 | DO_TEST_SUITE= |
| 721 | else |
| 722 | DO_TEST_SUITE=check |
| 723 | fi |
| 724 | AC_SUBST(DO_TEST_SUITE) |
| 725 | dnl |
| 726 | dnl Make our output files, being sure that we create the some miscellaneous |
| 727 | dnl directories |
| 728 | dnl |
| 729 | test -d lib || mkdir lib |
| 730 | test -d include || mkdir include |
| 731 | test -d include/linux || mkdir include/linux |
Theodore Ts'o | defde78 | 1999-01-04 07:39:19 +0000 | [diff] [blame] | 732 | test -d include/asm || mkdir include/asm |
Theodore Ts'o | 24b2c7a | 1997-06-07 20:42:58 +0000 | [diff] [blame] | 733 | rmakefile= |
| 734 | if test -d ${srcdir}/resize ; then |
| 735 | rmakefile=resize/Makefile |
| 736 | fi |
Theodore Ts'o | 44339bd | 1997-10-15 02:47:20 +0000 | [diff] [blame] | 737 | AC_OUTPUT(MCONFIG Makefile util/Makefile util/subst.conf lib/et/Makefile |
Theodore Ts'o | fc6d9d5 | 1997-04-29 14:51:31 +0000 | [diff] [blame] | 738 | lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile lib/uuid/Makefile |
Theodore Ts'o | ff6dbcc | 2002-05-24 22:44:42 -0400 | [diff] [blame] | 739 | lib/evms/Makefile |
Theodore Ts'o | b5ffead | 2002-05-11 19:17:00 -0400 | [diff] [blame] | 740 | misc/Makefile ext2ed/Makefile e2fsck/Makefile debugfs/Makefile \ |
| 741 | tests/Makefile tests/progs/Makefile $rmakefile doc/Makefile |
Theodore Ts'o | a64c9c1 | 2000-02-08 20:17:21 +0000 | [diff] [blame] | 742 | intl/Makefile po/Makefile.in) |