]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blame - configure.in
.del-configure~7a460879:
[thirdparty/e2fsprogs.git] / configure.in
CommitLineData
50e1e10f 1AC_INIT(version.h)
a4b2d3ce 2AC_PREREQ(2.12)
50e1e10f
TT
3MCONFIG=./MCONFIG
4AC_SUBST_FILE(MCONFIG)
74becf3c
TT
5BINARY_TYPE=bin
6dnl
7dnl This is to figure out the version number and the date....
8dnl
9E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \
10 | awk '{print $3}' | tr \" " " | awk '{print $1}'`
11DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
12 | tr \" " "`
13MONTH=`echo $DATE | awk -F- '{print $2}'`
14YEAR=`echo $DATE | awk -F- '{print $3}'`
15
40fa8cc9
TT
16if expr $YEAR ">" 1900 > /dev/null ; then
17 E2FSPROGS_YEAR=$YEAR
18elif expr $YEAR ">" 90 >/dev/null ; then
74becf3c
TT
19 E2FSPROGS_YEAR=19$YEAR
20else
21 E2FSPROGS_YEAR=20$YEAR
22fi
23
24case $MONTH in
25Jan) E2FSPROGS_MONTH="January" ;;
26Feb) E2FSPROGS_MONTH="February" ;;
27Mar) E2FSPROGS_MONTH="March" ;;
28Apr) E2FSPROGS_MONTH="April" ;;
29May) E2FSPROGS_MONTH="May" ;;
30Jun) E2FSPROGS_MONTH="June" ;;
31Jul) E2FSPROGS_MONTH="July" ;;
32Aug) E2FSPROGS_MONTH="August" ;;
33Sep) E2FSPROGS_MONTH="September" ;;
34Oct) E2FSPROGS_MONTH="October" ;;
35Nov) E2FSPROGS_MONTH="November" ;;
36Dec) E2FSPROGS_MONTH="December" ;;
37*) echo "Unknown month $MONTH??" ;;
38esac
39
40unset DATE MONTH YEAR
41echo "Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION"
42echo "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}"
43AC_SUBST(E2FSPROGS_YEAR)
44AC_SUBST(E2FSPROGS_MONTH)
45AC_SUBST(E2FSPROGS_VERSION)
fc6d9d51 46AC_REQUIRE([AC_CANONICAL_HOST])
74becf3c
TT
47dnl
48dnl set $(CC) from --with-cc=value
49dnl
50AC_ARG_WITH([cc],
51[ --with-cc=COMPILER select compiler to use],
52AC_MSG_RESULT(CC=$withval)
53CC=$withval,
54if test -z "$CC" ; then CC=cc; fi
55[AC_MSG_RESULT(CC defaults to $CC)])dnl
56export CC
57AC_SUBST([CC])
73ae2d4a 58AC_PROG_CC
74becf3c
TT
59dnl
60dnl set $(LD) from --with-linker=value
61dnl
62AC_ARG_WITH([linker],
63[ --with-linker=LINKER select linker to use],
64AC_MSG_RESULT(LD=$withval)
65LD=$withval,
66if test -z "$LD" ; then LD=$CC; fi
67[AC_MSG_RESULT(LD defaults to $LD)])dnl
68export LD
69AC_SUBST([LD])
70dnl
71dnl set $(CCOPTS) from --with-ccopts=value
72dnl
73AC_ARG_WITH([ccopts],
74[ --with-ccopts=CCOPTS select compiler command line options],
75AC_MSG_RESULT(CCOPTS is $withval)
76CCOPTS=$withval
77CFLAGS="$CFLAGS $withval",
78CCOPTS=)dnl
79AC_SUBST(CCOPTS)
80dnl
f8bd9807
TT
81dnl On systems without linux header files, we add an extra include directory
82dnl that holds enough to fake it (hopefully). Note that the $(top_srcdir) here
83dnl is quoted so that it gets expanded by make, not by configure.
84dnl
85AC_CHECK_HEADER(linux/fs.h, [linux_headers=yes], [linux_headers=no])
73ae2d4a
TT
86if test "$linux_headers" != yes; then
87 LINUX_INCLUDE='-I$(top_builddir)/include'
f8bd9807
TT
88fi
89AC_SUBST(LINUX_INCLUDE)
90dnl
a4d09610
TT
91dnl Set default values for library extentions. Will be dealt with after
92dnl parsing configuration opions, which may modify these
93dnl
94LIB_EXT=.a
95STATIC_LIB_EXT=.a
96PROFILE_LIB_EXT=.a
97dnl
74becf3c
TT
98dnl set $(LDFLAGS) from --with-ldopts=value
99dnl
100AC_ARG_WITH([ldopts],
101[ --with-ldopts=LDOPTS select linker command line options],
102AC_MSG_RESULT(LDFLAGS is $withval)
103LDFLAGS=$withval,
104LDFLAGS=)dnl
105AC_SUBST(LDFLAGS)
50e1e10f 106dnl
a4b2d3ce 107dnl Allow separate `root_prefix' to be specified
fc6d9d51 108dnl
a4b2d3ce
TT
109AC_ARG_WITH([root-prefix],
110[ --with-root-prefix=PREFIX override prefix variable for files to be placed in the root],
111root_prefix=$withval,
112root_prefix=NONE)dnl
fc6d9d51 113dnl
1917875f
TT
114dnl handle --enable-compression
115dnl
116AC_ARG_ENABLE([compression],
117[ --enable-compression enable EXPERIMENTAL compression support],
118if test "$enableval" = "no"
119then
120 echo "Disabling compression support"
121else
122 AC_DEFINE(ENABLE_COMPRESSION)
123 echo "Enabling compression support"
124 echo "WARNING: Compression support is experimental"
125fi
126,
127echo "Disabling compression support by default"
128)
129dnl
50e1e10f
TT
130dnl handle --enable-dll-shlibs
131dnl
132AC_ARG_ENABLE([dll-shlibs],
a4d09610 133[ --enable-dll-shlibs select DLL libraries],
50e1e10f
TT
134if test "$enableval" = "no"
135then
136 DLL_CMT=#
137 MAKEFILE_DLL=/dev/null
138 echo "Disabling DLL shared libraries"
139else
140 DLL_CMT=
141 MAKEFILE_DLL=$srcdir/lib/Makefile.dll-lib
74becf3c 142 BINARY_TYPE=dllbin
a4d09610 143 LIB_EXT=.sa
50e1e10f
TT
144 echo "Enabling DLL shared libraries"
145fi
146,
147MAKEFILE_DLL=/dev/null
148DLL_CMT=#
149echo "Disabling DLL shared libraries by default"
150)
151AC_SUBST(DLL_CMT)
152AC_SUBST_FILE(MAKEFILE_DLL)
153dnl
154dnl handle --enable-elf-shlibs
155dnl
156AC_ARG_ENABLE([elf-shlibs],
a4d09610 157[ --enable-elf-shlibs select ELF shared libraries],
50e1e10f
TT
158if test "$enableval" = "no"
159then
160 ELF_CMT=#
161 MAKEFILE_ELF=/dev/null
162 echo "Disabling ELF shared libraries"
163else
164 ELF_CMT=
165 MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib
f5955dda
TT
166 [case "$host_os" in
167 solaris2.*)
168 MAKEFILE_ELF=$srcdir/lib/Makefile.solaris-lib
169 ;;
170 esac]
74becf3c 171 BINARY_TYPE=elfbin
a4d09610 172 LIB_EXT=.so
50e1e10f
TT
173 echo "Enabling ELF shared libraries"
174fi
175,
176MAKEFILE_ELF=/dev/null
177ELF_CMT=#
178echo "Disabling ELF shared libraries by default"
179)
180AC_SUBST(ELF_CMT)
181AC_SUBST_FILE(MAKEFILE_ELF)
182dnl
183dnl handle --enable-bsd-shlibs
184dnl
185AC_ARG_ENABLE([bsd-shlibs],
a4d09610 186[ --enable-bsd-shlibs select BSD shared libraries],
50e1e10f
TT
187if test "$enableval" = "no"
188then
189 BSDLIB_CMT=#
190 MAKEFILE_BSDLIB=/dev/null
191 echo "Disabling BSD shared libraries"
192else
193 BSDLIB_CMT=
194 MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
a4d09610 195 LIB_EXT=.so
50e1e10f
TT
196 echo "Enabling BSD shared libraries"
197fi
198,
199MAKEFILE_BSDLIB=/dev/null
200BSDLIB_CMT=#
201echo "Disabling BSD shared libraries by default"
202)
203AC_SUBST(BSDLIB_CMT)
204AC_SUBST_FILE(MAKEFILE_BSDLIB)
205dnl
80bfaa3e
TT
206dnl handle --enable-jfs-debug
207dnl
208AC_ARG_ENABLE([jfs-debug],
209[ --enable-jfs-debug enable journal debugging],
210if test "$enableval" = "no"
211then
212 echo "Disabling journal debugging"
213else
214 AC_DEFINE(JFS_DEBUG)
215 echo "Enabling journal debugging"
216fi
217,
218echo "Disabling journal debugging by default"
219)
220dnl
a64c9c13
TT
221dnl Add internationalization support, using gettext.
222dnl
223PACKAGE=e2fsprogs
224VERSION="$E2FSPROGS_VERSION"
225AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
226AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
227AC_SUBST(PACKAGE)
228AC_SUBST(VERSION)
229
1917875f 230ALL_LINGUAS="it nyc"
a64c9c13
TT
231AM_GNU_GETTEXT
232dnl
50e1e10f
TT
233dnl handle --enable-profile
234dnl
235AC_ARG_ENABLE([profile],
a4d09610 236[ --enable-profile build profiling libraries],
50e1e10f
TT
237if test "$enableval" = "no"
238then
239 PROFILE_CMT=#
240 MAKEFILE_PROFILE=/dev/null
241 echo "Disabling profiling libraries"
242else
243 PROFILE_CMT=
244 MAKEFILE_PROFILE=$srcdir/lib/Makefile.profile
a4d09610 245 PROFILED_LIB_EXT=_p.a
50e1e10f
TT
246 echo "Building profiling libraries"
247fi
248,
249PROFILE_CMT=#
250MAKEFILE_PROFILE=/dev/null
251echo "Disabling profiling libraries by default"
252)
253AC_SUBST(PROFILE_CMT)
254AC_SUBST_FILE(MAKEFILE_PROFILE)
255dnl
256dnl handle --enable-checker
257dnl
258AC_ARG_ENABLE([checker],
a4d09610 259[ --enable-checker build checker libraries],
50e1e10f
TT
260if test "$enableval" = "no"
261then
262 CHECKER_CMT=#
263 MAKEFILE_CHECKER=/dev/null
264 echo "Disabling checker libraries"
265else
266 CHECKER_CMT=
267 MAKEFILE_CHECKER=$srcdir/lib/Makefile.checker
268 echo "Building checker libraries"
269fi
270,
271CHECKER_CMT=#
272MAKEFILE_CHECKER=/dev/null
273echo "Disabling checker libraries by default"
274)
275AC_SUBST(CHECKER_CMT)
276AC_SUBST_FILE(MAKEFILE_CHECKER)
277dnl
a4d09610
TT
278dnl Substitute library extensions
279dnl
280AC_SUBST(LIB_EXT)
281AC_SUBST(STATIC_LIB_EXT)
282AC_SUBST(PROFILED_LIB_EXT)
283dnl
4d0f3e17 284dnl handle --enable-dynamic-e2fsck
50e1e10f 285dnl
a4d09610
TT
286AC_ARG_ENABLE([dynamic-e2fsck],
287[ --enable-dynamic-e2fsck build e2fsck dynamically],
288if test "$enableval" = "no"
289then
290 E2FSCK_TYPE=static
291 echo "Building e2fsck statically"
292else
293 E2FSCK_TYPE=shared
294 echo "Building e2fsck dynamically"
295fi
296,
297E2FSCK_TYPE=static
298echo "Building e2fsck statically by default"
299)
300AC_SUBST(E2FSCK_TYPE)
50e1e10f 301dnl
fc6d9d51
TT
302dnl See whether to install the `fsck' wrapper program (that calls e2fsck)
303dnl
304AC_ARG_ENABLE([fsck],
305[ --enable-fsck build fsck wrapper program],
306[if test "$enableval" = "no"
307then
308 FSCK_PROG='' FSCK_MAN=''
309 echo "Not building fsck wrapper"
310else
311 FSCK_PROG=fsck FSCK_MAN=fsck.8
312 echo "Building fsck wrapper"
313fi]
314,
315[case "$host_os" in
316 gnu*)
317 FSCK_PROG='' FSCK_MAN=''
318 echo "Not building fsck wrapper by default"
319 ;;
320 *)
321 FSCK_PROG=fsck FSCK_MAN=fsck.8
322 echo "Building fsck wrapper by default"
323esac]
324)
325AC_SUBST(FSCK_PROG)
326AC_SUBST(FSCK_MAN)
327dnl
50e1e10f
TT
328dnl
329MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
330AC_SUBST_FILE(MAKEFILE_LIBRARY)
331dnl
fc6d9d51
TT
332dnl
333AC_ARG_ENABLE([old-bitops],
334[ --enable-old-bitops Use old (non-standard but native) bitmask operations],
335if test "$enableval" = "no"
336then
337 echo "Using new (standard) bitmask operations"
338else
339 AC_DEFINE(EXT2_OLD_BITOPS)
340 echo "Using old (native) bitmask operations"
341
342fi
343,
344echo "Using standard bitmask operations by default"
345)
346dnl
50e1e10f
TT
347dnl End of configuration options
348dnl
74becf3c 349AC_SUBST(BINARY_TYPE)
50e1e10f
TT
350AC_PROG_MAKE_SET
351AC_PATH_PROG(LN, ln, ln)
fc6d9d51 352AC_PROG_LN_S
50e1e10f
TT
353AC_PATH_PROG(MV, mv, mv)
354AC_PATH_PROG(CP, cp, cp)
355AC_PATH_PROG(RM, rm, rm)
356AC_PATH_PROG(CHMOD, chmod, :)
357AC_PATH_PROG(AWK, awk, awk)
358AC_PATH_PROG(SED, sed, sed)
9d564f73 359AC_PATH_PROG(PERL, perl, perl)
250f79f0 360AC_PATH_PROG(LDCONFIG, ldconfig, :)
50e1e10f
TT
361AC_CHECK_TOOL(AR, ar, ar)
362AC_CHECK_TOOL(RANLIB, ranlib, :)
363AC_CHECK_TOOL(STRIP, strip, :)
50e1e10f 364AC_PROG_INSTALL
6c133523
TT
365# See if we need a separate native compiler.
366if test $cross_compiling = no; then
367 BUILD_CC="$CC"
368 AC_SUBST(BUILD_CC)
369else
370 AC_CHECK_PROGS(BUILD_CC, gcc cc)
371fi
4d0f3e17 372AC_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)
50e1e10f
TT
373AC_FUNC_VPRINTF
374dnl
375dnl See if struct dirent has a d_namlen field (like bsd systems), implying
376dnl that the actual length of the structure may be grater than the declared
377dnl length.
378dnl
379AC_MSG_CHECKING(whether struct dirent has a d_namlen field)
380AC_CACHE_VAL(e2fsprogs_cv_struct_d_namlen,
381 AC_TRY_COMPILE(
382[#include <sys/types.h>
383#include <dirent.h>],
384 [struct dirent de; de.d_namlen = 0;],
385 [e2fsprogs_cv_struct_d_namlen=yes],
386 [e2fsprogs_cv_struct_d_namlen=no]))
387AC_MSG_RESULT($e2fsprogs_cv_struct_d_namlen)
388if test "$e2fsprogs_cv_struct_d_namlen" = yes; then
389 AC_DEFINE(HAVE_DIRENT_NAMLEN)
390fi
391dnl
b0b9c4de
TT
392dnl Check to see if llseek() is declared in unistd.h. On some libc's
393dnl it is, and on others it isn't..... Thank you glibc developers....
394dnl
395dnl Warning! Use of --enable-gcc-wall may throw off this test.
396dnl
397dnl
398AC_MSG_CHECKING(whether llseek declared in unistd.h)
399AC_CACHE_VAL(e2fsprogs_cv_have_llseek_prototype,
400 AC_TRY_COMPILE(
401[#include <unistd.h>], [extern int llseek(int);],
402 [e2fsprogs_cv_have_llseek_prototype=no],
403 [e2fsprogs_cv_have_llseek_prototype=yes]))
404AC_MSG_RESULT($e2fsprogs_cv_have_llseek_prototype)
405if test "$e2fsprogs_cv_have_llseek_prototype" = yes; then
406 AC_DEFINE(HAVE_LLSEEK_PROTOTYPE)
407fi
408dnl
6928adc9
TT
409dnl Check to see if lseek64() is declared in unistd.h. Glibc's header files
410dnl are so convoluted that I can't tell whether it will always be defined,
411dnl and if it isn't defined while lseek64 is defined in the library,
412dnl disaster will strike.
413dnl
414dnl Warning! Use of --enable-gcc-wall may throw off this test.
415dnl
416dnl
417AC_MSG_CHECKING(whether lseek64 declared in unistd.h)
418AC_CACHE_VAL(e2fsprogs_cv_have_lseek64_prototype,
419 AC_TRY_COMPILE(
420[#define _LARGEFILE_SOURCE
421#define _LARGEFILE64_SOURCE
422#include <unistd.h>], [extern int lseek64(int);],
423 [e2fsprogs_cv_have_lseek64_prototype=no],
424 [e2fsprogs_cv_have_lseek64_prototype=yes]))
425AC_MSG_RESULT($e2fsprogs_cv_have_lseek64_prototype)
426if test "$e2fsprogs_cv_have_lseek64_prototype" = yes; then
427 AC_DEFINE(HAVE_LSEEK64_PROTOTYPE)
428fi
429dnl
50e1e10f
TT
430dnl Word sizes...
431dnl
432if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then
433 # if cross-compiling, with no cached values, just assume something common.
434 ac_cv_sizeof_short=2
435 ac_cv_sizeof_int=4
436 ac_cv_sizeof_long=4
6c133523
TT
437 ac_cv_sizeof_long_long=8
438 AC_MSG_WARN([Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8])
50e1e10f
TT
439fi
440AC_CHECK_SIZEOF(short)
441AC_CHECK_SIZEOF(int)
442AC_CHECK_SIZEOF(long)
fc6d9d51 443AC_CHECK_SIZEOF(long long)
50e1e10f
TT
444SIZEOF_SHORT=$ac_cv_sizeof_short
445SIZEOF_INT=$ac_cv_sizeof_int
446SIZEOF_LONG=$ac_cv_sizeof_long
fc6d9d51 447SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long
50e1e10f
TT
448AC_SUBST(SIZEOF_SHORT)
449AC_SUBST(SIZEOF_INT)
450AC_SUBST(SIZEOF_LONG)
fc6d9d51 451AC_SUBST(SIZEOF_LONG_LONG)
50e1e10f
TT
452dnl
453dnl See if struct stat has a st_flags field, in which case we can get file
454dnl flags somewhat portably. Also check for the analogous setter, chflags().
455dnl
456AC_MSG_CHECKING(whether struct stat has a st_flags field)
457AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags,
458 AC_TRY_COMPILE([#include <sys/stat.h>],
459 [struct stat stat; stat.st_flags = 0;],
460 [e2fsprogs_cv_struct_st_flags=yes],
461 [e2fsprogs_cv_struct_st_flags=no]))
462AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags)
463if test "$e2fsprogs_cv_struct_st_flags" = yes; then
c03bc4e8
TT
464 AC_MSG_CHECKING(whether st_flags field is useful)
465 AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags_immut,
466 AC_TRY_COMPILE([#include <sys/stat.h>],
467 [struct stat stat; stat.st_flags |= UF_IMMUTABLE;],
468 [e2fsprogs_cv_struct_st_flags_immut=yes],
469 [e2fsprogs_cv_struct_st_flags_immut=no]))
470 AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags_immut)
471 if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then
472 AC_DEFINE(HAVE_STAT_FLAGS)
473 fi
50e1e10f 474fi
6928adc9 475AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 strdup getmntinfo strcasecmp srandom fchown mallinfo fdatasync)
fc6d9d51 476dnl
fc6d9d51
TT
477dnl Check to see if -lsocket is required (solaris) to make something
478dnl that uses socket() to compile; this is needed for the UUID library
479dnl
480SOCKET_LIB=''
481AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket])
482AC_SUBST(SOCKET_LIB)
483dnl
50e1e10f
TT
484dnl See if optreset exists
485dnl
486AC_MSG_CHECKING(for optreset)
487AC_CACHE_VAL(ac_cv_have_optreset,
488[AC_EGREP_HEADER(optreset, unistd.h,
489 ac_cv_have_optreset=yes, ac_cv_have_optreset=no)])dnl
490AC_MSG_RESULT($ac_cv_have_optreset)
491if test $ac_cv_have_optreset = yes; then
492 AC_DEFINE(HAVE_OPTRESET)
493fi
494dnl
8f3f29d3
TT
495dnl We use the EXT2 ioctls only under Linux
496dnl
497case "$host_os" in
498linux*)
499 AC_DEFINE(HAVE_EXT2_IOCTLS)
500 ;;
501esac
50e1e10f 502dnl
6c133523 503dnl Linux and Hurd places root files in the / by default
50e1e10f 504dnl
50e1e10f 505case "$host_os" in
6c133523 506linux* | gnu*)
a4b2d3ce
TT
507 if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
508 root_prefix="";
509 echo "On $host_os systems, root_prefix defaults to ''"
fc6d9d51
TT
510 fi
511 ;;
512esac
fc6d9d51 513dnl
a4b2d3ce 514dnl On Linux/hurd, force the prefix to be /usr
fc6d9d51
TT
515dnl
516case "$host_os" in
517linux* | gnu*)
518 if test "$prefix" = NONE ; then
a4b2d3ce
TT
519 prefix="/usr";
520 echo "On $host_os systems, prefix defaults to /usr"
50e1e10f
TT
521 fi
522;;
523esac
a4b2d3ce 524if test "$root_prefix" = NONE ; then
ffe1991f 525 if test "$prefix" = NONE ; then
a4b2d3ce
TT
526 root_prefix="$ac_default_prefix"
527 else
528 root_prefix="$prefix"
529 fi
530fi
531AC_SUBST(root_prefix)
50e1e10f
TT
532dnl
533dnl See if -static works.
50e1e10f 534dnl
ae851482
TT
535AC_MSG_CHECKING([whether linker accepts -static])
536AC_CACHE_VAL(ac_cv_e2fsprogs_use_static,
537[SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static"
538AC_TRY_LINK([#include <stdio.h>],[fflush(stdout);],
539 ac_cv_e2fsprogs_use_static=yes, ac_cv_e2fsprogs_use_static=no)
540LDFLAGS=$SAVE_LDFLAGS])
defde784
TT
541dnl
542dnl Regardless of how the test turns out, Solaris doesn't handle -static
543dnl This is caused by the socket library requiring the nsl library, which
544dnl requires the -dl library, which only works for dynamically linked
545dnl programs. It basically means you can't have statically linked programs
546dnl which use the network under Solaris.
547dnl
548case "$host_os" in
549solaris2.*)
550 ac_cv_e2fsprogs_use_static=no
551;;
552esac
ae851482 553AC_MSG_RESULT($ac_cv_e2fsprogs_use_static)
74becf3c 554LDFLAG_STATIC=
ae851482 555if test $ac_cv_e2fsprogs_use_static = yes; then
50e1e10f 556 LDFLAG_STATIC=-static
ae851482 557fi
50e1e10f
TT
558AC_SUBST(LDFLAG_STATIC)
559dnl
50e1e10f
TT
560dnl Make the ss and et directories work correctly.
561dnl
562SS_DIR=`cd ${srcdir}/lib/ss; pwd`
563ET_DIR=`cd ${srcdir}/lib/et; pwd`
564AC_SUBST(SS_DIR)
565AC_SUBST(ET_DIR)
566dnl
567dnl Only try to run the test suite if we're not cross compiling.
568dnl
569if test "$cross_compiling" = yes ; then
570 DO_TEST_SUITE=
571else
572 DO_TEST_SUITE=check
573fi
574AC_SUBST(DO_TEST_SUITE)
575dnl
576dnl Make our output files, being sure that we create the some miscellaneous
577dnl directories
578dnl
579test -d lib || mkdir lib
580test -d include || mkdir include
581test -d include/linux || mkdir include/linux
defde784 582test -d include/asm || mkdir include/asm
24b2c7a7
TT
583rmakefile=
584if test -d ${srcdir}/resize ; then
585 rmakefile=resize/Makefile
586fi
44339bdf 587AC_OUTPUT(MCONFIG Makefile util/Makefile util/subst.conf lib/et/Makefile
fc6d9d51
TT
588 lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile lib/uuid/Makefile
589 misc/Makefile e2fsck/Makefile debugfs/Makefile tests/Makefile
a64c9c13
TT
590 tests/progs/Makefile $rmakefile doc/Makefile
591 intl/Makefile po/Makefile.in)