~ubuntu-branches/ubuntu/edgy/e2fsprogs/edgy-security

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2004-09-19 09:43:14 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040919094314-ypmsn0h1ke583yda
Tags: 1.35-6ubuntu1
Remove ext3-add-journal.sh script.  It overcomplicates the initrd setup,
and the only problem it solves is to prevent a visible /.journal

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
        | awk '{print $3}' | tr \" " " | awk '{print $1}'`
11
11
DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
12
12
        | tr \" " "`
 
13
E2FSPROGS_DAY=`echo $DATE | awk -F- '{print $1}'`
13
14
MONTH=`echo $DATE | awk -F- '{print $2}'`
14
15
YEAR=`echo $DATE | awk -F- '{print $3}'`
15
16
 
42
43
echo "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}"
43
44
AC_SUBST(E2FSPROGS_YEAR)
44
45
AC_SUBST(E2FSPROGS_MONTH)
 
46
AC_SUBST(E2FSPROGS_DAY)
45
47
AC_SUBST(E2FSPROGS_VERSION)
46
48
AC_CANONICAL_HOST
47
49
dnl
 
50
dnl Should we compile EVMS plugin or not.  Complicated logic, spread
 
51
dnl over several different command-line options...
 
52
dnl
 
53
EVMS_CMT=
 
54
dnl
 
55
dnl Use diet libc
 
56
dnl 
 
57
AC_ARG_WITH([diet-libc],
 
58
[  --with-diet-libc      Use diet libc],
 
59
CC="diet cc -nostdinc"
 
60
EVMS_CMT="#"
 
61
AC_MSG_RESULT(CC=$CC))dnl
 
62
dnl
48
63
dnl set $(CC) from --with-cc=value
49
64
dnl
50
65
AC_ARG_WITH([cc],
86
101
fi
87
102
AC_SUBST(LINUX_INCLUDE)
88
103
dnl
 
104
dnl Alpha computers use fast and imprecise floating point code that may
 
105
dnl miss exceptions by default. Force sane options if we're using GCC.
 
106
AC_MSG_CHECKING(for additional special compiler flags)
 
107
if test "$GCC" = yes
 
108
then
 
109
    case "$host_cpu" in
 
110
        alpha)          addcflags="-mieee" ;;
 
111
    esac
 
112
fi
 
113
if test "x$addcflags" != x
 
114
then
 
115
    AC_MSG_RESULT($addcflags)
 
116
    CFLAGS="$addcflags $CFLAGS"
 
117
else
 
118
    AC_MSG_RESULT([[(none)]])
 
119
fi
 
120
dnl
89
121
dnl Set default values for library extentions.  Will be dealt with after
90
122
dnl parsing configuration opions, which may modify these
91
123
dnl
125
157
echo "Disabling compression support by default"
126
158
)
127
159
dnl
 
160
dnl handle --enable-htree
 
161
dnl
 
162
AC_ARG_ENABLE([htree],
 
163
[  --enable-htree         enable EXPERIMENTAL htree directory support],
 
164
if test "$enableval" = "no"
 
165
then
 
166
        HTREE_CMT=#
 
167
        echo "Disabling htree directory support"
 
168
else
 
169
        HTREE_CMT=
 
170
        AC_DEFINE(ENABLE_HTREE)
 
171
        echo "Enabling htree directory support"
 
172
fi
 
173
,
 
174
HTREE_CMT=
 
175
AC_DEFINE(ENABLE_HTREE)
 
176
echo "Enabling htree directory support by default"
 
177
)
 
178
AC_SUBST(HTREE_CMT)
 
179
dnl
 
180
dnl handle --enable-clear-htree
 
181
dnl
 
182
AC_ARG_ENABLE([htree-clear],
 
183
[  --enable-htree-clear           clear htree because we don't trust e2fsck],
 
184
if test "$enableval" = "no"
 
185
then
 
186
        HTREE_CLR_CMT=#
 
187
        echo "Disabling htree clearing"
 
188
else
 
189
        HTREE_CLR_CMT=
 
190
        AC_DEFINE(ENABLE_HTREE_CLEAR)
 
191
        echo "Enabling htree clearing"
 
192
fi
 
193
,
 
194
HTREE_CLR_CMT=#
 
195
echo "Disabling htree clearing by default"
 
196
)
 
197
AC_SUBST(HTREE_CLR_CMT)
 
198
dnl
 
199
dnl handle --enable-evms
 
200
dnl
 
201
AC_ARG_ENABLE([evms],
 
202
[  --disable-evms         don't build EVMS plugin],
 
203
if test "$enableval" == "no"
 
204
then
 
205
        EVMS_CMT="#"
 
206
        echo "Disabling EVMS plugin"
 
207
fi
 
208
)
 
209
dnl
 
210
dnl handle --enable-emvs-10
 
211
dnl
 
212
EVMS_ABI_CODE=120
 
213
AC_ARG_ENABLE([evms-10],
 
214
[  --enable-evms-10       use EVMS 1.0 ABI (instead of EVMS 1.2)],
 
215
if test "$enableval" != "no"
 
216
then
 
217
        EVMS_ABI_CODE=100
 
218
        echo "Enabling EVMS 1.0.0 ABI"
 
219
fi
 
220
)
 
221
dnl
 
222
dnl handle --enable-emvs-11
 
223
dnl
 
224
AC_ARG_ENABLE([evms-11],
 
225
[  --enable-evms-11       use EVMS 1.1 ABI (instead of EVMS 1.2)],
 
226
if test "$enableval" != "no"
 
227
then
 
228
        EVMS_ABI_CODE=110
 
229
        echo "Enabling EVMS 1.1.0 ABI"
 
230
fi
 
231
)
 
232
if test "$EVMS_ABI_CODE" = "120"
 
233
then
 
234
        echo "Using EVMS 1.2.0 ABI by default"
 
235
fi
 
236
AC_SUBST(EVMS_ABI_CODE)
 
237
dnl
128
238
dnl handle --enable-dll-shlibs
129
239
dnl
130
240
AC_ARG_ENABLE([dll-shlibs],
191
301
        BSDLIB_CMT=
192
302
        MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
193
303
        LIB_EXT=.so
 
304
        [case "$host_os" in
 
305
        darwin*)
 
306
                MAKEFILE_BSDLIB=$srcdir/lib/Makefile.darwin-lib
 
307
                LIB_EXT=.dylib
 
308
        ;;
 
309
        esac]
194
310
        echo "Enabling BSD shared libraries"
195
311
fi
196
312
,
252
368
AC_SUBST(STATIC_LIB_EXT)
253
369
AC_SUBST(PROFILED_LIB_EXT)
254
370
dnl
255
 
dnl handle --enable-jfs-debug
 
371
dnl handle --enable-jbd-debug
256
372
dnl
257
 
AC_ARG_ENABLE([jfs-debug],
258
 
[  --enable-jfs-debug     enable journal debugging],
 
373
AC_ARG_ENABLE([jbd-debug],
 
374
[  --enable-jbd-debug     enable journal debugging],
259
375
if test "$enableval" = "no"
260
376
then
261
377
        echo "Disabling journal debugging"
267
383
echo "Disabling journal debugging by default"
268
384
)
269
385
dnl
 
386
dnl handle --enable-blkid-debug
 
387
dnl
 
388
AC_ARG_ENABLE([blkid-debug],
 
389
[  --enable-blkid-debug    enable blkid debugging],
 
390
if test "$enableval" = "no"
 
391
then
 
392
        echo "Disabling blkid debugging"
 
393
else
 
394
        AC_DEFINE(CONFIG_BLKID_DEBUG)
 
395
        echo "Enabling blkid debugging"
 
396
fi
 
397
,
 
398
echo "Disabling blkid debugging by default"
 
399
)
 
400
dnl
 
401
dnl handle --enable-testio-debug
 
402
dnl
 
403
AC_ARG_ENABLE([testio-debug],
 
404
[  --enable-testio-debug   enable the use of the test I/O manager for debugging],
 
405
if test "$enableval" = "no"
 
406
then
 
407
        echo "Disabling testio debugging"
 
408
else
 
409
        AC_DEFINE(CONFIG_TESTIO_DEBUG)
 
410
        echo "Enabling testio debugging"
 
411
fi
 
412
,
 
413
echo "Disabling testio debugging by default"
 
414
)
 
415
dnl
270
416
dnl handle --enable-swapfs
271
417
dnl
272
418
AC_ARG_ENABLE([swapfs],
273
419
[  --disable-swapfs       disable support of legacy byte-swapped filesystems],
274
420
if test "$enableval" = "no"
275
421
then
 
422
        SWAPFS_CMT=#
276
423
        echo "Disabling swapfs support"
277
424
else
 
425
        SWAPFS_CMT=
278
426
        AC_DEFINE(ENABLE_SWAPFS)
279
427
        echo "Enabling swapfs support"
280
428
fi
281
429
,
 
430
SWAPFS_CMT=
282
431
echo "Enabling swapfs support by default"
283
432
AC_DEFINE(ENABLE_SWAPFS)
284
433
)
 
434
AC_SUBST(SWAPFS_CMT)
285
435
dnl
286
436
dnl handle --enable-debugfs
287
437
dnl
409
559
AC_SUBST(PACKAGE)
410
560
AC_SUBST(VERSION)
411
561
 
412
 
ALL_LINGUAS="it nyc tr"
413
562
AM_GNU_GETTEXT
414
563
dnl
415
564
dnl End of configuration options
437
586
else
438
587
  AC_CHECK_PROGS(BUILD_CC, gcc cc)
439
588
fi
440
 
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)
 
589
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/disk.h sys/disklabel.h sys/ioctl.h sys/mkdev.h sys/mount.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.h net/if_dl.h netinet/in.h)
441
590
AC_FUNC_VPRINTF
442
 
dnl
443
 
dnl See if struct dirent has a d_namlen field (like bsd systems), implying
444
 
dnl that the actual length of the structure may be grater than the declared
445
 
dnl length. 
446
 
dnl
447
 
AC_MSG_CHECKING(whether struct dirent has a d_namlen field)
448
 
AC_CACHE_VAL(e2fsprogs_cv_struct_d_namlen,
449
 
        AC_TRY_COMPILE(
450
 
[#include <sys/types.h>
451
 
#include <dirent.h>],
452
 
                [struct dirent de; de.d_namlen = 0;],
453
 
                [e2fsprogs_cv_struct_d_namlen=yes],
454
 
                [e2fsprogs_cv_struct_d_namlen=no]))
455
 
AC_MSG_RESULT($e2fsprogs_cv_struct_d_namlen)
456
 
if test "$e2fsprogs_cv_struct_d_namlen" = yes; then
457
 
  AC_DEFINE(HAVE_DIRENT_NAMLEN)
 
591
dnl Check to see if dirent has member d_reclen. On cygwin those d_reclen
 
592
dnl is not decleared.
 
593
AC_MSG_CHECKING(whether d_reclen declared in dirent)
 
594
AC_CACHE_VAL(e2fsprogs_cv_have_d_reclen_dirent,
 
595
        AC_TRY_COMPILE(
 
596
[#include <dirent.h>], [struct dirent de; de.d_reclen = 0; ],
 
597
        [e2fsprogs_cv_have_d_reclen_dirent=yes],
 
598
        [e2fsprogs_cv_have_d_reclen_dirent=no]))
 
599
AC_MSG_RESULT($e2fsprogs_cv_have_d_reclen_dirent)
 
600
if test "$e2fsprogs_cv_have_d_reclen_dirent" = yes; then
 
601
   AC_DEFINE(HAVE_RECLEN_DIRENT)
 
602
fi
 
603
dnl Check to see if ssize_t was decleared
 
604
AC_MSG_CHECKING(whether ssize_t declared)
 
605
AC_CACHE_VAL(e2fsprogs_cv_have_ssize_t,
 
606
        AC_TRY_COMPILE(
 
607
[#include <sys/types.h>], [ssize_t a = 0; ],
 
608
        [e2fsprogs_cv_have_ssize_t=yes],
 
609
        [e2fsprogs_cv_have_ssize_t=no]))
 
610
AC_MSG_RESULT($e2fsprogs_cv_have_ssize_t)
 
611
if test "$e2fsprogs_cv_have_ssize_t" = yes; then
 
612
   AC_DEFINE(HAVE_TYPE_SSIZE_T)
458
613
fi
459
614
dnl
460
615
dnl Check to see if llseek() is declared in unistd.h.  On some libc's 
519
674
AC_SUBST(SIZEOF_LONG_LONG)
520
675
AC_C_BIGENDIAN
521
676
dnl
 
677
dnl See if we have inttypes.h and if intptr_t is defined
 
678
dnl
 
679
AC_CHECK_HEADERS([inttypes.h])
 
680
AC_CHECK_TYPE(intptr_t,long)
 
681
dnl
522
682
dnl See if struct stat has a st_flags field, in which case we can get file
523
683
dnl flags somewhat portably.  Also check for the analogous setter, chflags().
524
684
dnl
541
701
          AC_DEFINE(HAVE_STAT_FLAGS)
542
702
  fi
543
703
fi
544
 
AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 getmntinfo strcasecmp srandom fchown mallinfo fdatasync strnlen)
 
704
dnl
 
705
dnl Check for the presence of SA_LEN
 
706
dnl
 
707
AC_MSG_CHECKING(whether struct sockaddr contains sa_len) 
 
708
AC_CACHE_VAL(e2fsprogs_cv_sockaddr_sa_len,
 
709
[AC_TRY_COMPILE([#include <sys/types.h>
 
710
#include <sys/socket.h>
 
711
],
 
712
[struct sockaddr sa;
 
713
sa.sa_len;],
 
714
e2fsprogs_cv_sockaddr_sa_len=yes,e2fsprogs_cv_sockaddr_sa_len=no)])
 
715
AC_MSG_RESULT([$]e2fsprogs_cv_sockaddr_sa_len)
 
716
if test $e2fsprogs_cv_sockaddr_sa_len = yes; then
 
717
  AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len])
 
718
fi
 
719
dnl
 
720
AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 getmntinfo strtoull strcasecmp srandom fchown mallinfo fdatasync strnlen strptime sysconf pathconf posix_memalign memalign valloc)
545
721
dnl
546
722
dnl Check to see if -lsocket is required (solaris) to make something
547
723
dnl that uses socket() to compile; this is needed for the UUID library
550
726
AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket])
551
727
AC_SUBST(SOCKET_LIB)
552
728
dnl
 
729
dnl Check to see if libdl exists for the sake of dlopen
 
730
dnl
 
731
DLOPEN_LIB=''
 
732
AC_CHECK_LIB(dl, dlopen, 
 
733
[DLOPEN_LIB=-ldl
 
734
AC_DEFINE(HAVE_DLOPEN)])
 
735
AC_SUBST(DLOPEN_LIB)
 
736
dnl
553
737
dnl See if optreset exists
554
738
dnl
555
739
AC_MSG_CHECKING(for optreset)
569
753
        ;;
570
754
esac
571
755
dnl
 
756
dnl OS-specific uncomment control
 
757
dnl
 
758
LINUX_CMT="#"
 
759
CYGWIN_CMT="#"
 
760
UNIX_CMT=
 
761
case "$host_os" in
 
762
linux*)
 
763
        LINUX_CMT=
 
764
        ;;
 
765
cygwin)
 
766
        CYGWIN_CMT=
 
767
        UNIX_CMT="#"
 
768
        EVMS_CMT="#"
 
769
        ;;
 
770
*)
 
771
        EVMS_CMT="#"
 
772
esac
 
773
AC_SUBST(LINUX_CMT)
 
774
AC_SUBST(CYGWIN_CMT)
 
775
AC_SUBST(UNIX_CMT)
 
776
AC_SUBST([EVMS_CMT])
 
777
dnl
572
778
dnl Linux and Hurd places root files in the / by default
573
779
dnl
574
780
case "$host_os" in
575
 
linux* | gnu*)
 
781
linux* | gnu* | k*bsd*-gnu)
576
782
        if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
577
783
                root_prefix="";
578
784
                echo "On $host_os systems, root_prefix defaults to ''"
583
789
dnl On Linux/hurd, force the prefix to be /usr
584
790
dnl
585
791
case "$host_os" in
586
 
linux* | gnu*)
 
792
linux* | gnu* | k*bsd*-gnu)
587
793
        if test "$prefix" = NONE ; then
588
794
                prefix="/usr";
589
795
                echo "On $host_os systems, prefix defaults to /usr"
 
796
                if test "$mandir" = '${prefix}/man' ; then
 
797
                        echo "...and mandir defaults to /usr/share/man"
 
798
                        mandir=/usr/share/man
 
799
                fi
590
800
        fi
591
801
;;
592
802
esac
596
806
        else
597
807
                root_prefix="$prefix"
598
808
        fi
 
809
        root_bindir=$bindir
 
810
        root_sbindir=$sbindir
 
811
        root_libdir=$libdir
 
812
        root_sysconfdir=$sysconfdir
 
813
else
 
814
        root_bindir='${root_prefix}/bin'
 
815
        root_sbindir='${root_prefix}/sbin'
 
816
        root_libdir='${root_prefix}/lib'
 
817
        root_sysconfdir='${root_prefix}/etc'
599
818
fi
600
819
AC_SUBST(root_prefix)
 
820
AC_SUBST(root_bindir)
 
821
AC_SUBST(root_sbindir)
 
822
AC_SUBST(root_libdir)
 
823
AC_SUBST(root_sysconfdir)
601
824
dnl
602
825
dnl See if -static works.
603
826
dnl
626
849
fi
627
850
AC_SUBST(LDFLAG_STATIC)
628
851
dnl
 
852
dnl Work around mysterious Darwin / GNU libintl problem
 
853
dnl (__asm__ redirection doesn't work for some mysterious reason.  Looks like
 
854
dnl Apple hacked gcc somehow?)
 
855
dnl
 
856
case "$host_os" in
 
857
darwin*)
 
858
        echo "Using Apple Darwin / GNU libintl workaround"
 
859
        AC_DEFINE(_INTL_REDIRECT_MACROS)
 
860
        ;;
 
861
esac
 
862
dnl
629
863
dnl Make the ss and et directories work correctly.
630
864
dnl
631
865
SS_DIR=`cd ${srcdir}/lib/ss; pwd`
642
876
fi
643
877
AC_SUBST(DO_TEST_SUITE)
644
878
dnl
 
879
dnl Only include the intl include files if we're building with them
 
880
dnl 
 
881
INTL_FLAGS=
 
882
if test "$USE_INCLUDED_LIBINTL" = "yes" ; then
 
883
        INTL_FLAGS='-I$(top_builddir)/intl -I$(top_srcdir)/intl'
 
884
fi
 
885
AC_SUBST(INTL_FLAGS)
 
886
dnl
645
887
dnl Make our output files, being sure that we create the some miscellaneous 
646
888
dnl directories
647
889
dnl
649
891
test -d include || mkdir include
650
892
test -d include/linux || mkdir include/linux
651
893
test -d include/asm || mkdir include/asm
652
 
rmakefile=
653
 
if test -d ${srcdir}/resize ; then
654
 
   rmakefile=resize/Makefile
655
 
fi
656
 
AC_OUTPUT(MCONFIG Makefile util/Makefile util/subst.conf lib/et/Makefile 
657
 
        lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile lib/uuid/Makefile
658
 
        misc/Makefile e2fsck/Makefile debugfs/Makefile tests/Makefile 
659
 
        tests/progs/Makefile $rmakefile doc/Makefile 
660
 
        intl/Makefile po/Makefile.in)
 
894
for i in MCONFIG Makefile e2fsprogs.spec \
 
895
        util/Makefile util/subst.conf util/gen-tarball \
 
896
        lib/et/Makefile lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile \
 
897
        lib/uuid/Makefile lib/uuid/uuid_types.h \
 
898
        lib/blkid/Makefile lib/blkid/blkid_types.h \
 
899
        lib/evms/Makefile misc/Makefile ext2ed/Makefile e2fsck/Makefile \
 
900
        debugfs/Makefile tests/Makefile tests/progs/Makefile \
 
901
        resize/Makefile doc/Makefile intl/Makefile po/Makefile.in ; do
 
902
        if test -d `dirname ${srcdir}/$i` ; then
 
903
                outlist="$outlist $i"
 
904
        fi
 
905
done
 
906
AC_OUTPUT($outlist)