3 AC_CONFIG_AUX_DIR(config)
8 dnl This is to figure out the version number and the date....
10 E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \
11 | awk '{print $3}' | tr \" " " | awk '{print $1}'`
12 DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
14 E2FSPROGS_DAY=`echo $DATE | awk -F- '{print $1}'`
15 MONTH=`echo $DATE | awk -F- '{print $2}'`
16 YEAR=`echo $DATE | awk -F- '{print $3}'`
18 if expr $YEAR ">" 1900 > /dev/null ; then
20 elif expr $YEAR ">" 90 >/dev/null ; then
21 E2FSPROGS_YEAR=19$YEAR
23 E2FSPROGS_YEAR=20$YEAR
27 Jan) MONTH_NUM=01; E2FSPROGS_MONTH="January" ;;
28 Feb) MONTH_NUM=02; E2FSPROGS_MONTH="February" ;;
29 Mar) MONTH_NUM=03; E2FSPROGS_MONTH="March" ;;
30 Apr) MONTH_NUM=04; E2FSPROGS_MONTH="April" ;;
31 May) MONTH_NUM=05; E2FSPROGS_MONTH="May" ;;
32 Jun) MONTH_NUM=06; E2FSPROGS_MONTH="June" ;;
33 Jul) MONTH_NUM=07; E2FSPROGS_MONTH="July" ;;
34 Aug) MONTH_NUM=08; E2FSPROGS_MONTH="August" ;;
35 Sep) MONTH_NUM=09; E2FSPROGS_MONTH="September" ;;
36 Oct) MONTH_NUM=10; E2FSPROGS_MONTH="October" ;;
37 Nov) MONTH_NUM=11; E2FSPROGS_MONTH="November" ;;
38 Dec) MONTH_NUM=12; E2FSPROGS_MONTH="December" ;;
39 *) echo "Unknown month $MONTH??" ;;
42 base_ver=`echo $E2FSPROGS_VERSION | \
43 sed -e 's/-WIP//' -e 's/pre-//' -e 's/-PLUS//'`
44 pre_vers=`echo $base_ver 0.01 - p | dc`
46 date_spec=${E2FSPROGS_YEAR}.${MONTH_NUM}.${E2FSPROGS_DAY}
48 case $E2FSPROGS_VERSION in
50 E2FSPROGS_PKGVER="$pre_vers+${base_ver}_WIP_$date_spec"
53 E2FSPROGS_PKGVER="$base_ver"
57 unset DATE MONTH YEAR base_ver pre_vers date_spec
58 echo "Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION"
59 echo "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}"
60 AC_SUBST(E2FSPROGS_YEAR)
61 AC_SUBST(E2FSPROGS_MONTH)
62 AC_SUBST(E2FSPROGS_DAY)
63 AC_SUBST(E2FSPROGS_VERSION)
64 AC_SUBST(E2FSPROGS_PKGVER)
69 AC_ARG_WITH([diet-libc],
70 [ --with-diet-libc Use diet libc],
71 CC="diet cc -nostdinc"
72 AC_MSG_RESULT(CC=$CC))dnl
74 dnl set $(CC) from --with-cc=value
77 [ --with-cc=COMPILER select compiler to use],
78 AC_MSG_RESULT(CC=$withval)
80 if test -z "$CC" ; then CC=cc; fi
81 [AC_MSG_RESULT(CC defaults to $CC)])dnl
87 dnl set $(LD) from --with-linker=value
90 [ --with-linker=LINKER select linker to use],
91 AC_MSG_RESULT(LD=$withval)
93 if test -z "$LD" ; then LD=$CC; fi
94 [AC_MSG_RESULT(LD defaults to $LD)])dnl
98 dnl set $(CCOPTS) from --with-ccopts=value
100 AC_ARG_WITH([ccopts],
101 [ --with-ccopts=CCOPTS select compiler command line options],
102 AC_MSG_RESULT(CCOPTS is $withval)
106 dnl On systems without linux header files, we add an extra include directory
107 dnl that holds enough to fake it (hopefully). Note that the $(top_srcdir) here
108 dnl is quoted so that it gets expanded by make, not by configure.
110 AC_CHECK_HEADER(linux/fs.h, [linux_headers=yes], [linux_headers=no])
111 if test "$linux_headers" != yes; then
112 LINUX_INCLUDE='-I$(top_builddir)/include'
114 AC_SUBST(LINUX_INCLUDE)
116 dnl Alpha computers use fast and imprecise floating point code that may
117 dnl miss exceptions by default. Force sane options if we're using GCC.
118 AC_MSG_CHECKING(for additional special compiler flags)
122 alpha) addcflags="-mieee" ;;
125 if test "x$addcflags" != x
127 AC_MSG_RESULT($addcflags)
128 CFLAGS="$addcflags $CFLAGS"
130 AC_MSG_RESULT([[(none)]])
133 dnl Set default values for library extentions. Will be dealt with after
134 dnl parsing configuration opions, which may modify these
140 dnl set $(LDFLAGS) from --with-ldopts=value
142 AC_ARG_WITH([ldopts],
143 [ --with-ldopts=LDOPTS select linker command line options],
144 AC_MSG_RESULT(LDFLAGS is $withval)
149 dnl Allow separate `root_prefix' to be specified
151 AC_ARG_WITH([root-prefix],
152 [ --with-root-prefix=PREFIX override prefix variable for files to be placed in the root],
153 root_prefix=$withval,
156 dnl handle --enable-maintainer-mode
158 AC_ARG_ENABLE([maintainer-mode],
159 [ --enable-maintainer-mode enable makefile rules useful for maintainers],
160 if test "$enableval" = "no"
163 echo "Disabling maintainer mode"
166 echo "Enabling maintainer mode"
170 echo "Disabling maintainer mode by default"
172 AC_SUBST(MAINTAINER_CMT)
174 dnl handle --enable-compression
176 AC_ARG_ENABLE([compression],
177 [ --enable-compression enable EXPERIMENTAL compression support],
178 if test "$enableval" = "no"
180 echo "Disabling compression support"
182 AC_DEFINE(ENABLE_COMPRESSION)
183 echo "Enabling compression support"
184 echo "WARNING: Compression support is experimental"
187 echo "Disabling compression support by default"
190 dnl handle --enable-htree
192 AC_ARG_ENABLE([htree],
193 [ --enable-htree enable EXPERIMENTAL htree directory support],
194 if test "$enableval" = "no"
197 echo "Disabling htree directory support"
200 AC_DEFINE(ENABLE_HTREE)
201 echo "Enabling htree directory support"
205 AC_DEFINE(ENABLE_HTREE)
206 echo "Enabling htree directory support by default"
210 dnl handle --enable-elf-shlibs
212 AC_ARG_ENABLE([elf-shlibs],
213 [ --enable-elf-shlibs select ELF shared libraries],
214 if test "$enableval" = "no"
217 MAKEFILE_ELF=/dev/null
218 echo "Disabling ELF shared libraries"
221 MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib
224 MAKEFILE_ELF=$srcdir/lib/Makefile.solaris-lib
229 echo "Enabling ELF shared libraries"
232 MAKEFILE_ELF=/dev/null
234 echo "Disabling ELF shared libraries by default"
237 AC_SUBST_FILE(MAKEFILE_ELF)
239 dnl handle --enable-bsd-shlibs
241 AC_ARG_ENABLE([bsd-shlibs],
242 [ --enable-bsd-shlibs select BSD shared libraries],
243 if test "$enableval" = "no"
246 MAKEFILE_BSDLIB=/dev/null
247 echo "Disabling BSD shared libraries"
250 MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
254 MAKEFILE_BSDLIB=$srcdir/lib/Makefile.darwin-lib
258 echo "Enabling BSD shared libraries"
261 MAKEFILE_BSDLIB=/dev/null
263 echo "Disabling BSD shared libraries by default"
266 AC_SUBST_FILE(MAKEFILE_BSDLIB)
268 dnl handle --enable-profile
270 AC_ARG_ENABLE([profile],
271 [ --enable-profile build profiling libraries],
272 if test "$enableval" = "no"
275 MAKEFILE_PROFILE=/dev/null
276 echo "Disabling profiling libraries"
279 MAKEFILE_PROFILE=$srcdir/lib/Makefile.profile
280 PROFILED_LIB_EXT=_p.a
281 echo "Building profiling libraries"
285 MAKEFILE_PROFILE=/dev/null
286 echo "Disabling profiling libraries by default"
288 AC_SUBST(PROFILE_CMT)
289 AC_SUBST_FILE(MAKEFILE_PROFILE)
291 dnl handle --enable-checker
293 AC_ARG_ENABLE([checker],
294 [ --enable-checker build checker libraries],
295 if test "$enableval" = "no"
298 MAKEFILE_CHECKER=/dev/null
299 echo "Disabling checker libraries"
302 MAKEFILE_CHECKER=$srcdir/lib/Makefile.checker
303 echo "Building checker libraries"
307 MAKEFILE_CHECKER=/dev/null
308 echo "Disabling checker libraries by default"
310 AC_SUBST(CHECKER_CMT)
311 AC_SUBST_FILE(MAKEFILE_CHECKER)
313 dnl Substitute library extensions
316 AC_SUBST(STATIC_LIB_EXT)
317 AC_SUBST(PROFILED_LIB_EXT)
319 dnl handle --enable-jbd-debug
321 AC_ARG_ENABLE([jbd-debug],
322 [ --enable-jbd-debug enable journal debugging],
323 if test "$enableval" = "no"
325 echo "Disabling journal debugging"
327 AC_DEFINE(CONFIG_JBD_DEBUG)
328 echo "Enabling journal debugging"
331 echo "Disabling journal debugging by default"
334 dnl handle --enable-blkid-debug
336 AC_ARG_ENABLE([blkid-debug],
337 [ --enable-blkid-debug enable blkid debugging],
338 if test "$enableval" = "no"
340 echo "Disabling blkid debugging"
342 AC_DEFINE(CONFIG_BLKID_DEBUG)
343 echo "Enabling blkid debugging"
346 echo "Disabling blkid debugging by default"
349 dnl handle --enable-testio-debug
351 AC_ARG_ENABLE([testio-debug],
352 [ --enable-testio-debug enable the use of the test I/O manager for debugging],
353 if test "$enableval" = "no"
355 echo "Disabling testio debugging"
357 AC_DEFINE(CONFIG_TESTIO_DEBUG)
358 echo "Enabling testio debugging"
361 echo "Disabling testio debugging by default"
364 dnl handle --enable-debugfs
366 AC_ARG_ENABLE([debugfs],
367 [ --disable-debugfs disable support of debugfs program],
368 if test "$enableval" = "no"
370 echo "Disabling debugfs support"
374 echo "Enabling debugfs support"
377 echo "Enabling debugfs support by default"
380 AC_SUBST(DEBUGFS_CMT)
382 dnl handle --enable-imager
384 AC_ARG_ENABLE([imager],
385 [ --disable-imager disable support of e2image program],
386 if test "$enableval" = "no"
388 echo "Disabling e2image support"
392 echo "Enabling e2image support"
395 echo "Enabling e2image support by default"
400 dnl handle --enable-resizer
402 AC_ARG_ENABLE([resizer],
403 [ --disable-resizer disable support of e2resize program],
404 if test "$enableval" = "no"
406 echo "Disabling e2resize support"
410 echo "Enabling e2resize support"
413 echo "Enabling e2resize support by default"
416 AC_SUBST(RESIZER_CMT)
418 dnl handle --enable-dynamic-e2fsck
420 AC_ARG_ENABLE([dynamic-e2fsck],
421 [ --enable-dynamic-e2fsck build e2fsck dynamically],
422 if test "$enableval" = "no"
425 echo "Building e2fsck statically"
428 echo "Building e2fsck dynamically"
432 echo "Building e2fsck statically by default"
434 AC_SUBST(E2FSCK_TYPE)
436 dnl See whether to install the `fsck' wrapper program (that calls e2fsck)
438 AC_ARG_ENABLE([fsck],
439 [ --enable-fsck build fsck wrapper program],
440 [if test "$enableval" = "no"
442 FSCK_PROG='' FSCK_MAN=''
443 echo "Not building fsck wrapper"
445 FSCK_PROG=fsck FSCK_MAN=fsck.8
446 echo "Building fsck wrapper"
451 FSCK_PROG='' FSCK_MAN=''
452 echo "Not building fsck wrapper by default"
455 FSCK_PROG=fsck FSCK_MAN=fsck.8
456 echo "Building fsck wrapper by default"
462 dnl See whether to install the `e2initrd-helper' program
464 AC_ARG_ENABLE([e2initrd-helper],
465 [ --enable-e2initrd-helper build e2initrd-helper program],
466 [if test "$enableval" = "no"
468 E2INITRD_PROG='' E2INITRD_MAN=''
469 echo "Not building e2initrd helper"
471 E2INITRD_PROG=e2initrd_helper E2INITRD_MAN=e2initrd_helper.8
472 echo "Building e2initrd helper"
475 E2INITRD_PROG=e2initrd_helper E2INITRD_MAN=e2initrd_helper.8
476 echo "Building e2initrd helper by default"
478 AC_SUBST(E2INITRD_PROG)
479 AC_SUBST(E2INITRD_MAN)
480 dnl handle --enable-blkid-devmapper
482 AC_ARG_ENABLE([blkid-devmapper],
483 [ --enable-blkid-devmapper build with device-mapper support],
484 [if test "$enableval" = "no"
486 echo "Disabling device-mapper support"
489 STATIC_DEVMAPPER_LIBS=''
491 AC_DEFINE(HAVE_DEVMAPPER)
492 echo "Enabling device-mapper support"
494 DEVMAPPER_REQ='libselinux libsepol'
495 DEVMAPPER_PC_LIBS='-ldevmapper'
496 DEVMAPPER_LIBS='-ldevmapper -lselinux -lsepol -lpthread'
497 STATIC_DEVMAPPER_LIBS='/usr/lib/libdevmapper.a /usr/lib/libselinux.a /usr/lib/libsepol.a -lpthread'
501 echo "Disabling device-mapper support by default"
503 AC_SUBST(DEVMAPPER_REQ)
504 AC_SUBST(DEVMAPPER_PC_LIBS)
505 AC_SUBST(DEVMAPPER_LIBS)
506 AC_SUBST(STATIC_DEVMAPPER_LIBS)
510 MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
511 AC_SUBST_FILE(MAKEFILE_LIBRARY)
513 dnl Add internationalization support, using gettext.
515 GETTEXT_PACKAGE=e2fsprogs
517 VERSION="$E2FSPROGS_VERSION"
519 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
520 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
521 AC_SUBST(GETTEXT_PACKAGE)
527 dnl End of configuration options
529 AC_SUBST(BINARY_TYPE)
531 AC_PATH_PROG(LN, ln, ln)
533 AC_PATH_PROG(MV, mv, mv)
534 AC_PATH_PROG(CP, cp, cp)
535 AC_PATH_PROG(RM, rm, rm)
536 AC_PATH_PROG(CHMOD, chmod, :)
539 AC_PATH_PROG(SED, sed, sed)
540 AC_PATH_PROG(PERL, perl, perl)
541 AC_PATH_PROG(LDCONFIG, ldconfig, :)
542 AC_CHECK_TOOL(AR, ar, ar)
543 AC_CHECK_TOOL(RANLIB, ranlib, :)
544 AC_CHECK_TOOL(STRIP, strip, :)
546 # See if we need a separate native compiler.
547 if test $cross_compiling = no; then
551 AC_CHECK_PROGS(BUILD_CC, gcc cc)
554 AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h stdint.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/mman.h sys/mkdev.h sys/prctl.h sys/queue.h sys/sockio.h sys/socket.h sys/sysmacros.h sys/time.h sys/stat.h sys/types.h sys/wait.h sys/resource.h net/if_dl.h netinet/in.h utime.h)
555 AC_CHECK_HEADERS(sys/disk.h sys/mount.h,,,
558 #include <sys/queue.h>
561 AC_CHECK_HEADERS(net/if.h,,,
564 #include <sys/types.h>
567 #include <sys/socket.h>
571 dnl Check to see if dirent has member d_reclen. On cygwin those d_reclen
572 dnl is not decleared.
573 AC_CHECK_MEMBER(struct dirent.d_reclen,[AC_DEFINE(HAVE_RECLEN_DIRENT)],,
574 [#include <dirent.h>])
575 dnl Check to see if ssize_t was decleared
576 AC_CHECK_TYPE(ssize_t,[AC_DEFINE(HAVE_TYPE_SSIZE_T)],,
577 [#include <sys/types.h>])
579 dnl Check to see if llseek() is declared in unistd.h. On some libc's
580 dnl it is, and on others it isn't..... Thank you glibc developers....
582 AC_CHECK_DECL(llseek,[AC_DEFINE(HAVE_LLSEEK_PROTOTYPE)],,
583 [#include <unistd.h>])
585 dnl Check to see if lseek64() is declared in unistd.h. Glibc's header files
586 dnl are so convoluted that I can't tell whether it will always be defined,
587 dnl and if it isn't defined while lseek64 is defined in the library,
588 dnl disaster will strike.
590 dnl Warning! Use of --enable-gcc-wall may throw off this test.
593 AC_CHECK_DECL(lseek64,[AC_DEFINE(HAVE_LSEEK64_PROTOTYPE)],,
594 [#define _LARGEFILE_SOURCE
595 #define _LARGEFILE64_SOURCE
596 #include <unistd.h>])
600 if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then
601 # if cross-compiling, with no cached values, just assume something common.
605 ac_cv_sizeof_long_long=8
606 AC_MSG_WARN([Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8])
608 AC_CHECK_SIZEOF(short)
610 AC_CHECK_SIZEOF(long)
611 AC_CHECK_SIZEOF(long long)
612 SIZEOF_SHORT=$ac_cv_sizeof_short
613 SIZEOF_INT=$ac_cv_sizeof_int
614 SIZEOF_LONG=$ac_cv_sizeof_long
615 SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long
616 AC_SUBST(SIZEOF_SHORT)
618 AC_SUBST(SIZEOF_LONG)
619 AC_SUBST(SIZEOF_LONG_LONG)
621 BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
622 ASM_TYPES_HEADER=./asm_types.h
623 AC_SUBST_FILE(ASM_TYPES_HEADER)
625 dnl See if we have inttypes.h and if intptr_t is defined
627 AC_CHECK_HEADERS([inttypes.h])
628 AC_CHECK_TYPES(intptr_t)
630 dnl See if struct stat has a st_flags field, in which case we can get file
631 dnl flags somewhat portably. Also check for the analogous setter, chflags().
633 AC_MSG_CHECKING(whether struct stat has a st_flags field)
634 AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags,
635 AC_TRY_COMPILE([#include <sys/stat.h>],
636 [struct stat stat; stat.st_flags = 0;],
637 [e2fsprogs_cv_struct_st_flags=yes],
638 [e2fsprogs_cv_struct_st_flags=no]))
639 AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags)
640 if test "$e2fsprogs_cv_struct_st_flags" = yes; then
641 AC_MSG_CHECKING(whether st_flags field is useful)
642 AC_CACHE_VAL(e2fsprogs_cv_struct_st_flags_immut,
643 AC_TRY_COMPILE([#include <sys/stat.h>],
644 [struct stat stat; stat.st_flags |= UF_IMMUTABLE;],
645 [e2fsprogs_cv_struct_st_flags_immut=yes],
646 [e2fsprogs_cv_struct_st_flags_immut=no]))
647 AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags_immut)
648 if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then
649 AC_DEFINE(HAVE_STAT_FLAGS)
653 dnl Check for the presence of SA_LEN
655 AC_CHECK_MEMBER(struct sockaddr.sa_len,
656 AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]),,
657 [#include <sys/types.h>
658 #include <sys/socket.h>])
660 AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 fstat64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid)
662 dnl Check to see if -lsocket is required (solaris) to make something
663 dnl that uses socket() to compile; this is needed for the UUID library
666 AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket])
669 dnl Check to see if libdl exists for the sake of dlopen
672 AC_CHECK_LIB(dl, dlopen,
674 AC_DEFINE(HAVE_DLOPEN)])
677 dnl See if optreset exists
679 AC_MSG_CHECKING(for optreset)
680 AC_CACHE_VAL(ac_cv_have_optreset,
681 [AC_EGREP_HEADER(optreset, unistd.h,
682 ac_cv_have_optreset=yes, ac_cv_have_optreset=no)])dnl
683 AC_MSG_RESULT($ac_cv_have_optreset)
684 if test $ac_cv_have_optreset = yes; then
685 AC_DEFINE(HAVE_OPTRESET)
688 dnl Check for unified diff
690 AC_MSG_CHECKING(for unified diff option)
691 if diff -u $0 $0 >& /dev/null ; then
696 AC_MSG_RESULT($UNI_DIFF_OPTS)
697 AC_SUBST(UNI_DIFF_OPTS)
699 dnl We use the EXT2 ioctls only under Linux
703 AC_DEFINE(HAVE_EXT2_IOCTLS)
707 dnl OS-specific uncomment control
725 dnl Linux and Hurd places root files in the / by default
728 linux* | gnu* | k*bsd*-gnu)
729 if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
731 echo "On $host_os systems, root_prefix defaults to ''"
736 dnl On Linux/hurd, force the prefix to be /usr
739 linux* | gnu* | k*bsd*-gnu)
740 if test "$prefix" = NONE ; then
742 echo "On $host_os systems, prefix defaults to /usr"
743 if test "$mandir" = '${prefix}/man' ; then
744 echo "...and mandir defaults to /usr/share/man"
745 mandir=/usr/share/man
750 if test "$root_prefix" = NONE ; then
751 if test "$prefix" = NONE ; then
752 root_prefix="$ac_default_prefix"
754 root_prefix="$prefix"
757 root_sbindir=$sbindir
759 root_sysconfdir=$sysconfdir
761 root_bindir='${root_prefix}/bin'
762 root_sbindir='${root_prefix}/sbin'
763 root_libdir='${root_prefix}/lib'
764 root_sysconfdir='${root_prefix}/etc'
766 AC_SUBST(root_prefix)
767 AC_SUBST(root_bindir)
768 AC_SUBST(root_sbindir)
769 AC_SUBST(root_libdir)
770 AC_SUBST(root_sysconfdir)
772 dnl See if -static works.
774 AC_MSG_CHECKING([whether linker accepts -static])
775 AC_CACHE_VAL(ac_cv_e2fsprogs_use_static,
776 [SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static"
777 AC_TRY_LINK([#include <stdio.h>],[fflush(stdout);],
778 ac_cv_e2fsprogs_use_static=yes, ac_cv_e2fsprogs_use_static=no)
779 LDFLAGS=$SAVE_LDFLAGS])
781 dnl Regardless of how the test turns out, Solaris doesn't handle -static
782 dnl This is caused by the socket library requiring the nsl library, which
783 dnl requires the -dl library, which only works for dynamically linked
784 dnl programs. It basically means you can't have statically linked programs
785 dnl which use the network under Solaris.
789 ac_cv_e2fsprogs_use_static=no
792 AC_MSG_RESULT($ac_cv_e2fsprogs_use_static)
794 if test $ac_cv_e2fsprogs_use_static = yes; then
795 LDFLAG_STATIC=-static
797 AC_SUBST(LDFLAG_STATIC)
799 dnl Work around mysterious Darwin / GNU libintl problem
800 dnl (__asm__ redirection doesn't work for some mysterious reason. Looks like
801 dnl Apple hacked gcc somehow?)
805 echo "Using Apple Darwin / GNU libintl workaround"
806 AC_DEFINE(_INTL_REDIRECT_MACROS)
810 dnl Make the ss and et directories work correctly.
812 SS_DIR=`cd ${srcdir}/lib/ss; pwd`
813 ET_DIR=`cd ${srcdir}/lib/et; pwd`
817 dnl Only try to run the test suite if we're not cross compiling.
819 if test "$cross_compiling" = yes ; then
824 AC_SUBST(DO_TEST_SUITE)
826 dnl Only include the intl include files if we're building with them
829 if test "$USE_INCLUDED_LIBINTL" = "yes" ; then
830 INTL_FLAGS='-I$(top_builddir)/intl -I$(top_srcdir)/intl'
836 if test $cross_compiling = no; then
837 BUILD_CFLAGS="$CFLAGS"
838 BUILD_LDFLAGS="$LDFLAGS"
843 AC_SUBST(BUILD_CFLAGS)
844 AC_SUBST(BUILD_LDFLAGS)
846 dnl Make our output files, being sure that we create the some miscellaneous
849 test -d lib || mkdir lib
850 test -d include || mkdir include
851 test -d include/linux || mkdir include/linux
852 test -d include/asm || mkdir include/asm
853 for i in MCONFIG Makefile e2fsprogs.spec \
854 util/Makefile util/subst.conf util/gen-tarball \
855 lib/et/Makefile lib/ss/Makefile lib/e2p/Makefile \
856 lib/ext2fs/Makefile lib/ext2fs/ext2_types.h \
857 lib/uuid/Makefile lib/uuid/uuid_types.h \
858 lib/blkid/Makefile lib/blkid/blkid_types.h \
859 lib/ss/ss.pc lib/uuid/uuid.pc lib/et/com_err.pc \
860 lib/e2p/e2p.pc lib/blkid/blkid.pc lib/ext2fs/ext2fs.pc \
861 misc/Makefile ext2ed/Makefile e2fsck/Makefile \
862 debugfs/Makefile tests/Makefile tests/progs/Makefile \
863 resize/Makefile doc/Makefile intl/Makefile po/Makefile.in ; do
864 if test -d `dirname ${srcdir}/$i` ; then
865 outlist="$outlist $i"
869 if test -f util/gen-tarball; then chmod +x util/gen-tarball; fi