OSDN Git Service

maint: adjust the URL that will appear in the generated announcement
[android-x86/external-parted.git] / configure.ac
index 17958a0..3915ac0 100644 (file)
@@ -1,5 +1,5 @@
 dnl GNU Parted - a library and front end for manipulation hard disk partitions
-dnl Copyright (C) 1998-2002, 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1998-2002, 2005-2011 Free Software Foundation, Inc.
 dnl
 dnl This file may be modified and/or distributed without restriction.
 
@@ -52,7 +52,7 @@ AC_SUBST([LT_CURRENT])
 AC_SUBST([LT_REVISION])
 AC_SUBST([LT_AGE])
 
-AM_INIT_AUTOMAKE([1.11 dist-xz color-tests parallel-tests])
+AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz color-tests parallel-tests])
 AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
 
 AC_CANONICAL_HOST
@@ -110,21 +110,13 @@ AC_ARG_ENABLE([dynamic-loading],
                enable_dynamic_loading=yes
        fi
 )
-if test "$enable_discover_only" = yes -a "$enable_dynamic_loading" = yes; then
+if test "$enable_discover_only" = yes \
+ && test "$enable_dynamic_loading" = yes; then
        AC_MSG_ERROR(
 [You can't use --enable-dynamic-loading and --disable-discover-only together]
        )
 fi
 
-AC_ARG_ENABLE([fs],
-       [  --enable-fs             include filesystem support [default=yes]], ,
-       enable_fs=yes
-)
-if test "$enable_fs" = yes; then
-       AC_DEFINE([ENABLE_FS], [1],
-                 [Include file system support.  i.e. libparted/fs_...])
-fi
-
 AC_ARG_ENABLE([debug],
        [  --enable-debug          compile in assertions [default=yes]], ,
        enable_debug=yes
@@ -156,11 +148,6 @@ if test "$enable_pc98" = yes; then
                   collisions with msdos partition tables])
 fi
 
-AC_ARG_ENABLE([Werror],
-       [  --enable-Werror         build with gcc -Werror [default=yes]], ,
-       enable_Werror=yes
-)
-
 AC_ARG_ENABLE([hfs-extract-fs],
        [  --enable-hfs-extract-fs Extract special HFS files for debugging [default=no]], ,
        enable_hfs_extract_fs=no
@@ -256,6 +243,9 @@ if test "$gl_gcc_warnings" = yes; then
   gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
   gl_WARN_ADD([-Wno-unused-macros]) # Too many warnings for now
 
+  # FIXME: investigate these
+  gl_WARN_ADD([-Wno-jump-misses-init])
+
   # In spite of excluding -Wlogical-op above, it is enabled, as of
   # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
   gl_WARN_ADD([-Wno-logical-op])
@@ -279,7 +269,7 @@ AC_CHECK_SIZEOF([off_t], [64], [
 ])
 
 AM_ENABLE_SHARED
-if test "$OS" = linux -a $ac_cv_sizeof_off_t -lt 8; then
+if test "$OS" = linux && test $ac_cv_sizeof_off_t -lt 8; then
        dnl Need to disable shared libraries, to get llseek() to work.  Long
        dnl story.  The short story is: lseek() isn't in glibc, so a syscall
        dnl must be made.  syscalls can't be made from within shared libraries,
@@ -289,9 +279,9 @@ off_t is less than 8 bytes.  Using llseek syscall, and disabling shared
 libraries.)
        AM_DISABLE_SHARED
 fi
-AM_PROG_LIBTOOL
+AC_PROG_LIBTOOL
 
-AM_GNU_GETTEXT_VERSION([0.15])
+AM_GNU_GETTEXT_VERSION([0.18])
 AM_GNU_GETTEXT([external])
 if test "$USE_INCLUDED_LIBINTL" = "yes"; then
        AC_MSG_ERROR([
@@ -306,10 +296,13 @@ fi
 
 dnl Check for libdl, if we are doing dynamic loading
 DL_LIBS=""
+AC_SUBST([DYNAMIC_LOADING])
+DYNAMIC_LOADING=no
 if test "$enable_dynamic_loading" = yes; then
        AC_CHECK_LIB([dl], [dlopen],
                DL_LIBS="-ldl"
                PARTED_LIBS="$PARTED_LIBS -ldl"
+               DYNAMIC_LOADING=yes
                AC_DEFINE([DYNAMIC_LOADING], [1], [Lazy linking to fs libs]),
                AC_MSG_ERROR(
                        [-ldl not found!  Try using --disable-dynamic-loading]
@@ -322,15 +315,12 @@ dnl Check for libuuid
 UUID_LIBS=""
 AC_CHECK_LIB([uuid], [uuid_generate], [UUID_LIBS="-luuid"],
        [AC_MSG_ERROR(dnl
-[GNU Parted requires libuuid - a part of the e2fsprogs package (but
-sometimes distributed separately in uuid-devel or similar)
+[GNU Parted requires libuuid - a part of the util-linux-ng package (but
+usually distributed separately in libuuid-devel, uuid-dev or similar)
 This can probably be found on your distribution's CD or FTP site or at:
-         http://web.mit.edu/tytso/www/linux/e2fsprogs.html
-Note: if you are using precompiled packages you will also need the development
-package as well (which may be called e2fsprogs-devel or something similar).
-If you compile e2fsprogs yourself then you need to do 'make install' and
-'make install-libs'.])]
-)
+    http://userweb.kernel.org/~kzak/util-linux-ng/
+Note: originally, libuuid was part of the e2fsprogs package.  Later, it
+moved to util-linux-ng-2.16, and that package is now the preferred source.])])
 AC_SUBST([UUID_LIBS])
 
 dnl Check for libdevmapper
@@ -360,7 +350,7 @@ AC_SUBST([SELINUX_LIBS])
 
 dnl Check for libreiserfs
 REISER_LIBS=""
-if test "$enable_dynamic_loading" = no -a "$enable_discover_only" = no; then
+if test "$enable_dynamic_loading" = no && test "$enable_discover_only" = no; then
        OLD_LIBS="$LIBS"
        AC_CHECK_LIB([dal], [dal_equals],
                LIBS="-ldal"
@@ -515,6 +505,7 @@ If you can't find one try:
 )
 
 AC_CHECK_HEADERS([getopt.h])
+AC_CHECK_HEADERS([linux/ext2_fs.h])
 
 dnl required for libparted/llseek.c  (TODO: make linux-x86 only)
 if test "$OS" = linux; then
@@ -588,18 +579,24 @@ fi
 
 AC_CHECK_FUNCS([canonicalize_file_name])
 
-# CFLAGS="$CFLAGS -W -Wall -Wno-unused -Wno-switch -Wno-format"
-
-if test "$enable_Werror" = yes; then
-       CFLAGS="$CFLAGS -Werror"
-fi
-
 DATE=$(date '+%d %b %Y %H:%M')
 USER=$(whoami)
 HOST=$(hostname)
 BUILDINFO="$USER@$HOST, $DATE"
 AC_SUBST([BUILDINFO])
 
+LIB_BLKID=
+AC_SUBST([LIB_BLKID])
+pe_saved_libs=$LIBS
+  AC_SEARCH_LIBS([blkid_probe_get_topology], [blkid],
+    [test "$ac_cv_search_blkid_probe_get_topology" = "none required" \
+     || LIB_BLKID=$ac_cv_search_blkid_probe_get_topology])
+  AC_CHECK_FUNC([blkid_probe_get_topology], [use_blkid=1], [use_blkid=0])
+LIBS=$pe_saved_libs
+AC_DEFINE_UNQUOTED([USE_BLKID], [$use_blkid],
+  [Define if you have sufficient blkid support.])
+AC_CHECK_HEADERS_ONCE([blkid/blkid.h])
+
 AC_OUTPUT([
 Makefile
 lib/Makefile
@@ -618,6 +615,7 @@ libparted/fs/ntfs/Makefile
 libparted/fs/reiserfs/Makefile
 libparted/fs/ufs/Makefile
 libparted/fs/xfs/Makefile
+libparted/fs/nilfs2/Makefile
 libparted/tests/Makefile
 libparted.pc
 parted/Makefile
@@ -626,7 +624,6 @@ doc/Makefile
 doc/C/Makefile
 doc/pt_BR/Makefile
 debug/Makefile
-debug/clearfat/Makefile
 debug/test/Makefile
 tests/Makefile
 po/Makefile.in