1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
dnl ======================================================================
dnl Setup
dnl
dnl NEW version (automake1.6)
dnl
AC_INIT(sp-gxmlcpp, 1.0.20040603)
AC_CONFIG_SRCDIR(sp-gxmlcpp/XMLTree.hpp)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
# See DEVELOPERS file for shared library versioning instructions
#Guidelines for SO_VERSION changes for an official release (initial
#version is always "0:0:0"):
#One of A, B1 or B2 will be your path:
#
# A) If only the source code, but not the interface was changed,
# the REVISION is increased by one.
# B) If the interface changed, the INTERFACE number is increased by
# one and REVISION is set to zero.
# B1) If only new interfaces were added, the AGE is increased by
# one.
# B2) If interfaces were removed or there were incompatible
# changes, the AGE is set to zero.
# INTERFACE:REVISION:AGE
SO_VERSION=2:5:1
AC_SUBST(SO_VERSION)
# Checks for programs.
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AC_PROG_AWK
dnl ### Needed for doxygen (delete if not needed otherwwise)
AC_PATH_PROG(PERL, perl)
test x"$PERL" = x && AC_MSG_ERROR("perl not found in PATH")
AC_SUBST(PERL)
dnl 'unset' is not portable, but setting to null is not enough to avoid using
dnl the cached value! For ancient shells "rm config.cache" is a solution.
UNSET=true
if unset UNSET 2>/dev/null; then UNSET=unset; fi
# Checks for libraries.
# check for dl lib
AC_LANG_PUSH(C++)
$UNSET ac_cv_header_dlfcn_h
AC_CHECK_HEADER(dlfcn.h, ,
[ AC_MSG_ERROR("error: libdl include file dlfcn.h not found")])
AC_CHECK_LIB(dl, dlopen, ,
[ AC_MSG_ERROR("error: failed to detect libdl")])
AC_LANG_POP
# check for xml2 lib
AC_LANG_PUSH(C++)
# try to guess the libxml2 path
if test "${with_xml2_includes+set}" != set; then
if test -d /usr/local/include/libxml2 ; then
with_xml2_includes=/usr/local/include/libxml2
with_xml2_includesset=set
elif test -d /include/libxml2 ; then
with_xml2_includes=/include/libxml2
with_xml2_includesset=set
elif test -d /usr/include/libxml2 ; then
with_xml2_includes=/usr/include/libxml2
with_xml2_includesset=set
fi
fi
if test "${with_xml2_includes+set}" != set; then
AC_MSG_ERROR(
"error: libxml2 include file libxml/xmlversion.h not found")
fi
$UNSET ac_cv_header_xmlversion_h
$UNSET ac_cv_lib_xml2_xmlCheckVersion
smr_CHECK_LIB(xml2, xml2, specify location of xml2 library, xmlCheckVersion,
libxml/xmlversion.h, [-pthread])
AC_SUBST(xml2_LIBS)
AC_SUBST(xml2_CFLAGS)
if test ${with_xml2} != yes ; then
AC_MSG_ERROR("error: failed to detect libxml2")
fi
AC_LANG_POP
# check for xslt lib (needs libxml2)
AC_LANG_PUSH(C++)
$UNSET ac_cv_header_libxslt_xsltInternals_h
$UNSET ac_cv_lib_xslt_xsltApplyStylesheet
smr_CHECK_LIB(
xslt, xslt, specify location of xslt library, xsltApplyStylesheet,
libxslt/xsltInternals.h, [-pthread], [${xml2_CFLAGS}] )
AC_SUBST(xslt_LIBS)
AC_SUBST(xslt_CFLAGS)
if test ${with_xslt} != yes ; then
AC_MSG_ERROR("error: failed to detect libxslt")
fi
AC_LANG_POP
# check for cppunit lib
AC_LANG_PUSH(C++)
$UNSET ac_cv_header_cppunit_TestCase_h
AC_CHECK_HEADER(cppunit/TestCase.h, ,
[ AC_MSG_ERROR("error: libcppunit include file cppunitfcn.h not found")
])
AC_TRY_COMPILE([#include <cppunit/TestCase.h>], [CppUnit::TestCase t;], ,
[ AC_MSG_ERROR("error: failed to detect libcppunit") ])
AC_LANG_POP
AC_CONFIG_FILES([
Makefile
Doxyfile
doc/Makefile
examples/Makefile
sp-gxmlcpp/Makefile
])
AC_OUTPUT
|