dnl Process this file with autoconf to produce a configure script. AC_INIT(xls2xml.c) PACKAGE=xls2xml dnl 4a) Increment when remove or change interfaces. dnl [USER SHOULD UPDATE] MAJOR=1 dnl 4a) 5) Increment when add interfaces. dnl 6) Set to zero when remove (or change) interfaces. dnl [PROGRAMMERS SHOULD LOOK WHAT'S NEW] MINOR=0 dnl 3) Increment when interfaces not changed at all, dnl only bug fixes or internal changes. dnl 4b) Set to zero when add, remove or change interfaces. dnl [ONLY MAINTAINER SHOULD CARE] MICRO=0 dnl dnl Set this too (I don't know how to do it automatically =) ): MAJOR_PLUS_MINOR=1 dnl VERSION=$MAJOR.$MINOR.$MICRO dnl Version info for libxls2xml.so = CURRENT:REVISION:AGE VERSION_INFO=$MAJOR_PLUS_MINOR:$MICRO:$MINOR AC_DEFINE_UNQUOTED(VERSION_INFO,"${VERSION_INFO}",Define xls2xml rev version) AC_SUBST(VERSION_INFO) AM_INIT_AUTOMAKE($PACKAGE, $VERSION) AM_CONFIG_HEADER(config.h) dnl Checks for program versions. AC_PREREQ(2.13) dnl Checks for programs. AC_PROG_CC dnl ANSI C compiling AM_PROG_CC_STDC dnl AM_DISABLE_SHARED MAKE SHARED LIBRARIES IF SUPPORTED AM_PROG_LIBTOOL dnl ************** AC_PROG_RANLIB AC_PROG_INSTALL AC_PATH_PROG(RM, rm, /bin/rm) AC_PATH_PROG(AR, ar, /usr/bin/ar) AC_PROG_MAKE_SET dnl Checks for libraries. AM_PATH_COLE(2.0.1, [LIBS="$LIBS $COLE_LIBS" CFLAGS="$CFLAGS $COLE_CFLAGS"]) dnl ******* libxml ******* AC_ARG_WITH(xml-config, [ --with-xml-config=DIR libxml xml-config script is in DIR], XML_CONFIG_DIR="$withval", XML_CONFIG_DIR="no") XML_CHECK CFLAGS="$CFLAGS $XML_CFLAGS" LIB="$LIBS $XML_LIB" dnl AC_CHECK_LIB(z, inflate) dnl Checks for header files. AC_HEADER_STDC dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_CHECK_SIZEOF(unsigned char) AC_CHECK_SIZEOF(unsigned short) AC_CHECK_SIZEOF(unsigned int) AC_CHECK_SIZEOF(unsigned long) AC_CHECK_SIZEOF(unsigned long long) AC_CHECK_SIZEOF(float) AC_CHECK_SIZEOF(double) AC_CHECK_SIZEOF(long double) AC_C_BIGENDIAN dnl Checks for library functions. dnl Checks for getopt_long, substitute the distributed versions if not found AC_CHECK_FUNC(getopt_long,,[LIBOBJS="$LIBOBJS getopt.o getopt1.o"]) AC_SUBST(LIBOBJS) dnl Verbose AC_ARG_ENABLE(xls2xml-verbose, [ --enable-xls2xml-verbose makes xls2xml verbose (for diagnostic) ], enable_xls2xml_verbose="$enableval",) if test x$enable_xls2xml_verbose = xyes ; then AC_DEFINE(XLS2XML_VERBOSE,1,[Define if makes xls2xml verbose (for diagnostic)]) fi dnl OSF check AC_ARG_ENABLE(osf-check, [ --enable-osf-check makes OSF check short align ], enable_osf_check="$enableval",) if test x$enable_osf_check = xyes ; then osf_check_flags="-assume noaligned_objects" else osf_check_flags="" fi AC_SUBST(osf_check_flags) AC_OUTPUT(Makefile test.sh rec/Makefile doc/Makefile, echo timestamp > stamp-h; chmod +x test.sh) AC_MSG_RESULT([Configured $PACKAGE version $VERSION])