2010-02-10 14:37:56 +00:00
|
|
|
AC_INIT([libisofs], [0.6.28], [http://libburnia-project.org])
|
2007-11-24 12:14:45 +00:00
|
|
|
AC_PREREQ([2.50])
|
|
|
|
dnl AC_CONFIG_HEADER([config.h])
|
|
|
|
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AC_CANONICAL_TARGET
|
|
|
|
|
2010-02-04 08:30:42 +00:00
|
|
|
LIBBURNIA_SET_FLAGS
|
|
|
|
|
2007-11-24 12:14:45 +00:00
|
|
|
AM_INIT_AUTOMAKE([subdir-objects])
|
|
|
|
|
|
|
|
dnl A61101 This breaks Linux build (makes 32 bit off_t)
|
|
|
|
dnl http://sourceware.org/autobook/autobook/autobook_96.html says
|
|
|
|
dnl one must include some config.h and this was a pitfall.
|
|
|
|
dnl So why dig the pit at all ?
|
|
|
|
dnl AM_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl if MAJOR or MINOR version changes, be sure to change AC_INIT above to match
|
|
|
|
dnl
|
2008-01-27 02:39:06 +00:00
|
|
|
dnl CURRENT and AGE describe the binary compatibility interval of a
|
|
|
|
dnl dynamic library.
|
|
|
|
dnl See also http://www.gnu.org/software/libtool/manual.html#Interfaces
|
|
|
|
dnl
|
|
|
|
dnl The name of the library will be libisofs.so.$CURRENT-$AGE.$AGE.$REV
|
|
|
|
dnl In the terminology of this file:
|
|
|
|
dnl CURRENT = LT_CURRENT
|
|
|
|
dnl REV = LT_REVISION
|
|
|
|
dnl AGE = LT_AGE
|
|
|
|
dnl
|
|
|
|
dnl LT_CURRENT, LT_REVISION and LT_AGE get set directly now.
|
|
|
|
dnl
|
|
|
|
dnl SONAME of the emerging library is LT_CURRENT - LT_AGE.
|
|
|
|
dnl The linker will do no finer checks. Especially no age range check for
|
|
|
|
dnl the cdrskin binary. If SONAME matches, then the couple starts.
|
|
|
|
dnl
|
|
|
|
dnl Therefore a run time check is provided by libisofs function
|
|
|
|
dnl iso_lib_version(). It returns the major, minor and micro revision of the
|
|
|
|
dnl library. This means LIBISOFS_*_VERSION kept its second job which does not
|
|
|
|
dnl comply to the usual ways of configure.ac . I.e. now *officially* this is
|
|
|
|
dnl the source code release version as announced to the public. It has no
|
2009-10-08 12:41:32 +00:00
|
|
|
dnl connection to SONAME or libtool version numbering.
|
2008-01-27 02:39:06 +00:00
|
|
|
dnl It rather feeds the API function iso_lib_version().
|
|
|
|
dnl
|
|
|
|
dnl If LIBISOFS_*_VERSION changes, be sure to change AC_INIT above to match.
|
|
|
|
dnl
|
2007-11-24 12:14:45 +00:00
|
|
|
LIBISOFS_MAJOR_VERSION=0
|
2008-01-27 02:39:06 +00:00
|
|
|
LIBISOFS_MINOR_VERSION=6
|
2010-02-10 14:37:56 +00:00
|
|
|
LIBISOFS_MICRO_VERSION=28
|
2007-11-24 12:14:45 +00:00
|
|
|
LIBISOFS_VERSION=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION.$LIBISOFS_MICRO_VERSION
|
|
|
|
|
|
|
|
AC_SUBST(LIBISOFS_MAJOR_VERSION)
|
|
|
|
AC_SUBST(LIBISOFS_MINOR_VERSION)
|
|
|
|
AC_SUBST(LIBISOFS_MICRO_VERSION)
|
|
|
|
AC_SUBST(LIBISOFS_VERSION)
|
|
|
|
|
|
|
|
dnl Libtool versioning
|
|
|
|
LT_RELEASE=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION
|
2010-02-10 14:37:56 +00:00
|
|
|
# 2010.02.10 development jump has not yet happened
|
|
|
|
# SONAME = 30 - 24 = 6 . Library name = libisofs.6.24.0
|
|
|
|
LT_CURRENT=30
|
|
|
|
LT_AGE=24
|
2008-01-27 02:39:06 +00:00
|
|
|
LT_REVISION=0
|
2007-11-24 12:14:45 +00:00
|
|
|
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
|
|
|
|
|
|
|
|
AC_SUBST(LT_RELEASE)
|
|
|
|
AC_SUBST(LT_CURRENT)
|
|
|
|
AC_SUBST(LT_REVISION)
|
|
|
|
AC_SUBST(LT_AGE)
|
|
|
|
AC_SUBST(LT_CURRENT_MINUS_AGE)
|
|
|
|
|
|
|
|
AC_PREFIX_DEFAULT([/usr/local])
|
|
|
|
test "$prefix" = "NONE" && prefix=$ac_default_prefix
|
|
|
|
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
|
|
|
dnl Large file support
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
AC_FUNC_FSEEKO
|
|
|
|
AC_CHECK_FUNC([fseeko])
|
|
|
|
if test ! $ac_cv_func_fseeko; then
|
2008-01-30 19:12:54 +00:00
|
|
|
AC_MSG_ERROR([Libisofs requires largefile support.])
|
2007-11-24 12:14:45 +00:00
|
|
|
fi
|
|
|
|
|
2009-02-04 19:57:20 +00:00
|
|
|
dnl If iconv(3) is in an extra lib, then it gets added to variable LIBS.
|
|
|
|
dnl If not, then no -liconv will be added.
|
2009-07-01 11:16:29 +00:00
|
|
|
LIBBURNIA_CHECK_ICONV
|
|
|
|
|
2009-02-04 19:57:20 +00:00
|
|
|
|
2007-11-24 12:14:45 +00:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AC_SUBST(LIBTOOL_DEPS)
|
|
|
|
LIBTOOL="$LIBTOOL --silent"
|
|
|
|
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS()
|
|
|
|
|
2008-01-27 14:53:48 +00:00
|
|
|
dnl Use GNU extensions if available
|
|
|
|
AC_DEFINE(_GNU_SOURCE, 1)
|
|
|
|
|
|
|
|
dnl Check for tm_gmtoff field in struct tm
|
2007-11-24 12:14:45 +00:00
|
|
|
AC_CHECK_MEMBER([struct tm.tm_gmtoff],
|
|
|
|
[AC_DEFINE(HAVE_TM_GMTOFF, 1,
|
|
|
|
[Define this if tm structure includes a tm_gmtoff entry.])],
|
|
|
|
,
|
|
|
|
[#include <time.h>])
|
|
|
|
|
2008-01-27 14:53:48 +00:00
|
|
|
dnl Check if non standard timegm() function is available
|
2008-01-27 13:41:52 +00:00
|
|
|
AC_CHECK_DECL([timegm],
|
|
|
|
[AC_DEFINE(HAVE_TIMEGM, 1, [Define this if timegm function is available])],
|
|
|
|
,
|
|
|
|
[#include <time.h>])
|
|
|
|
|
2008-01-27 14:53:48 +00:00
|
|
|
dnl Check if non standard eaccess() function is available
|
|
|
|
AC_CHECK_DECL([eaccess],
|
|
|
|
[AC_DEFINE(HAVE_EACCESS, 1, [Define this if eaccess function is available])],
|
|
|
|
,
|
|
|
|
[#include <unistd.h>])
|
|
|
|
|
2007-11-24 12:14:45 +00:00
|
|
|
THREAD_LIBS=-lpthread
|
|
|
|
AC_SUBST(THREAD_LIBS)
|
|
|
|
|
|
|
|
TARGET_SHIZZLE
|
|
|
|
AC_SUBST(ARCH)
|
|
|
|
AC_SUBST(LIBBURN_ARCH_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
dnl See if the user wants aggressive optimizations of the code
|
|
|
|
AC_ARG_ENABLE(debug,
|
2009-07-07 18:02:03 +00:00
|
|
|
[ --enable-debug Disable aggressive optimizations, default=yes],
|
2007-11-24 12:14:45 +00:00
|
|
|
, enable_debug=yes)
|
|
|
|
if test x$enable_debug != xyes; then
|
|
|
|
if test x$GCC = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -O3"
|
|
|
|
CFLAGS="$CFLAGS -fexpensive-optimizations"
|
|
|
|
fi
|
|
|
|
CFLAGS="$CFLAGS -DNDEBUG"
|
|
|
|
else
|
|
|
|
if test x$GCC = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -g -pedantic -Wall"
|
|
|
|
fi
|
|
|
|
CFLAGS="$CFLAGS -DDEBUG"
|
|
|
|
fi
|
|
|
|
|
2008-02-09 16:15:58 +00:00
|
|
|
dnl Verbose debug to make libisofs issue more debug messages
|
|
|
|
AC_ARG_ENABLE(verbose-debug,
|
2009-07-07 18:02:03 +00:00
|
|
|
[ --enable-verbose-debug Enable verbose debug messages, default=no],
|
2008-02-09 16:15:58 +00:00
|
|
|
AC_DEFINE(LIBISOFS_VERBOSE_DEBUG, 1))
|
|
|
|
|
|
|
|
|
2009-07-07 18:02:03 +00:00
|
|
|
dnl Determine target directory for libisofs-*.pc
|
|
|
|
dnl Important: Must be performed _after_ TARGET_SHIZZLE
|
|
|
|
dnl
|
|
|
|
LIBBURNIA_SET_PKGCONFIG
|
|
|
|
|
|
|
|
|
|
|
|
dnl Add compiler-specific flags
|
|
|
|
|
2009-01-23 17:28:51 +00:00
|
|
|
AC_ARG_ENABLE(libacl,
|
2009-07-03 18:11:01 +00:00
|
|
|
[ --enable-libacl Enable use of libacl by libisofs, default=yes],
|
2009-01-23 17:28:51 +00:00
|
|
|
, enable_libacl=yes)
|
2009-07-07 18:02:03 +00:00
|
|
|
if test "x$enable_libacl" = xyes; then
|
2009-01-23 17:28:51 +00:00
|
|
|
dnl Check whether there is libacl-devel and libacl-runtime.
|
|
|
|
dnl If not, erase this macro which would enable use of acl_to_text and others
|
|
|
|
LIBACL_DEF="-DLibisofs_with_aaip_acL"
|
|
|
|
dnl The empty yes case obviously causes -lacl to be linked
|
|
|
|
AC_CHECK_HEADER(sys/acl.h, AC_CHECK_LIB(acl, acl_to_text, , LIBACL_DEF= ), LIBACL_DEF= )
|
|
|
|
else
|
|
|
|
LIBACL_DEF=
|
|
|
|
fi
|
|
|
|
AC_SUBST(LIBACL_DEF)
|
|
|
|
|
|
|
|
|
|
|
|
dnl ts A90123
|
|
|
|
AC_ARG_ENABLE(xattr,
|
2009-07-03 18:11:01 +00:00
|
|
|
[ --enable-xattr Enable use of xattr by libisofs, default=yes],
|
2009-01-23 17:28:51 +00:00
|
|
|
, enable_xattr=yes)
|
2009-07-07 18:02:03 +00:00
|
|
|
if test "x$enable_xattr" = xyes; then
|
2009-01-23 17:28:51 +00:00
|
|
|
dnl Check whether there is the header for Linux xattr.
|
|
|
|
dnl If not, erase this macro which would enable use of listxattr and others
|
|
|
|
XATTR_DEF="-DLibisofs_with_aaip_xattR"
|
|
|
|
AC_CHECK_HEADER(attr/xattr.h, AC_CHECK_LIB(c, listxattr, X= , XATTR_DEF= ), XATTR_DEF= )
|
|
|
|
else
|
|
|
|
XATTR_DEF=
|
|
|
|
fi
|
|
|
|
AC_SUBST(XATTR_DEF)
|
|
|
|
|
|
|
|
|
2009-04-09 14:18:50 +00:00
|
|
|
dnl ts A90409
|
|
|
|
AC_ARG_ENABLE(zlib,
|
2009-07-03 18:11:01 +00:00
|
|
|
[ --enable-zlib Enable use of zlib by libisofs, default=yes],
|
2009-04-09 14:18:50 +00:00
|
|
|
, enable_zlib=yes)
|
2009-07-07 18:02:03 +00:00
|
|
|
if test "x$enable_zlib" = xyes; then
|
2009-04-09 14:18:50 +00:00
|
|
|
dnl Check whether there is the header for zlib.
|
|
|
|
dnl If not, erase this macro which would enable use of compress2() and others.
|
2010-01-07 08:42:09 +00:00
|
|
|
dnl Linking fails on SuSE 9.0 because zlib has compress2() but lacks
|
|
|
|
dnl compressBound(). So compressBound is the more modern thing to test.
|
|
|
|
dnl The empty parameter after "compressBound" causes -lz.
|
2009-04-09 14:18:50 +00:00
|
|
|
ZLIB_DEF="-DLibisofs_with_zliB"
|
2010-01-07 08:42:09 +00:00
|
|
|
AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, compressBound, , ZLIB_DEF= ), ZLIB_DEF= )
|
2009-04-09 14:18:50 +00:00
|
|
|
else
|
|
|
|
ZLIB_DEF=
|
|
|
|
fi
|
|
|
|
AC_SUBST(ZLIB_DEF)
|
|
|
|
|
|
|
|
|
2007-11-24 12:14:45 +00:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
2008-01-29 20:30:52 +00:00
|
|
|
doc/doxygen.conf
|
2007-11-24 12:14:45 +00:00
|
|
|
version.h
|
2008-02-01 15:47:04 +00:00
|
|
|
libisofs-1.pc
|
2007-11-24 12:14:45 +00:00
|
|
|
])
|
|
|
|
AC_OUTPUT
|