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