|
|
|
@ -1,4 +1,20 @@ |
|
|
|
|
# init |
|
|
|
|
# $Id$ |
|
|
|
|
AC_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR]) |
|
|
|
|
AC_DEFUN([AX_DEFINE_DIR], [ |
|
|
|
|
prefix_NONE= |
|
|
|
|
exec_prefix_NONE= |
|
|
|
|
test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix |
|
|
|
|
test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix |
|
|
|
|
dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn |
|
|
|
|
dnl refers to ${prefix}. Thus we have to use `eval' twice. |
|
|
|
|
eval ax_define_dir="\"[$]$2\"" |
|
|
|
|
eval ax_define_dir="\"$ax_define_dir\"" |
|
|
|
|
AC_SUBST($1, "$ax_define_dir") |
|
|
|
|
AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3]) |
|
|
|
|
test "$prefix_NONE" && prefix=NONE |
|
|
|
|
test "$exec_prefix_NONE" && exec_prefix=NONE |
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
AC_INIT([README]) |
|
|
|
|
SRC_DIR=src |
|
|
|
|
TST_DIR=test |
|
|
|
@ -7,10 +23,10 @@ DOC_DIR=doc |
|
|
|
|
m4_define(x_packagename, libxml-cxx) |
|
|
|
|
m4_define(x_major, 1) |
|
|
|
|
m4_define(x_minor, 0) |
|
|
|
|
|
|
|
|
|
PACKAGENAME=x_packagename |
|
|
|
|
MAJOR=x_major |
|
|
|
|
MINOR=x_minor |
|
|
|
|
BUILDDATE=$(date "+%d.%m.%Y/%H.%M") |
|
|
|
|
|
|
|
|
|
LEAST="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" |
|
|
|
|
for path in . .. ../..; do |
|
|
|
@ -23,22 +39,20 @@ done |
|
|
|
|
AM_INIT_AUTOMAKE($PACKAGENAME, $MAJOR.$MINOR.$LEAST, [marc@waeckerlin.org]) |
|
|
|
|
|
|
|
|
|
# files to create |
|
|
|
|
AC_CONFIG_FILES(makefile src/version.cxx |
|
|
|
|
AC_CONFIG_FILES([makefile ${PACKAGENAME}.spec src/version.cxx |
|
|
|
|
src/makefile test/makefile doc/examples/makefile |
|
|
|
|
doc/doxyfile doc/makefile |
|
|
|
|
src/libxml-cxx.pc debian/changelog |
|
|
|
|
libxml-cxx.spec) |
|
|
|
|
doc/doxyfile doc/makefile |
|
|
|
|
src/${PACKAGENAME}.pc debian/changelog]) |
|
|
|
|
|
|
|
|
|
# copy M4 to shell |
|
|
|
|
AC_SUBST(MAJOR) |
|
|
|
|
AC_SUBST(MINOR) |
|
|
|
|
AC_SUBST(LEAST) |
|
|
|
|
|
|
|
|
|
README=README |
|
|
|
|
AC_SUBST_FILE(README) |
|
|
|
|
AC_SUBST(BUILDDATE) |
|
|
|
|
|
|
|
|
|
# libtool versioning |
|
|
|
|
LIB_MAJOR=m4_eval(x_major+x_minor) |
|
|
|
|
LIB_MINOR=$LEAST |
|
|
|
|
LIB_MINOR=${LEAST} |
|
|
|
|
LIB_LEAST=x_minor |
|
|
|
|
LIB_VERSION="${LIB_MAJOR}:${LIB_MINOR}:${LIB_LEAST}" |
|
|
|
|
AC_SUBST(LIB_VERSION) |
|
|
|
@ -46,12 +60,18 @@ AC_SUBST(LIB_VERSION) |
|
|
|
|
# home |
|
|
|
|
AC_SUBST(HOME) |
|
|
|
|
|
|
|
|
|
# datadir for languages |
|
|
|
|
AX_DEFINE_DIR([DATADIR], [datadir]) |
|
|
|
|
#AC_SUBST(DATADIR) |
|
|
|
|
|
|
|
|
|
# macros |
|
|
|
|
README=README |
|
|
|
|
AC_SUBST_FILE(README) |
|
|
|
|
CHANGE_LOG=ChangeLog |
|
|
|
|
AC_SUBST_FILE(CHANGE_LOG) |
|
|
|
|
|
|
|
|
|
AM_CPPFLAGS="-DPACKAGEVERSION='\"${VERSION}\"' -DPACKAGENAME='\"${PACKAGENAME}\"'" |
|
|
|
|
|
|
|
|
|
# Get rid of that stupid -O2 -g opions! |
|
|
|
|
CXXFLAGS="${CXXFLAGS:-}" |
|
|
|
|
|
|
|
|
@ -67,6 +87,7 @@ AC_PROG_MAKE_SET |
|
|
|
|
AC_PROG_LIBTOOL |
|
|
|
|
AC_CHECK_PROG(have_doxygen, doxygen, yes, no) |
|
|
|
|
AC_CHECK_PROG(have_dot, dot, yes, no) |
|
|
|
|
PKG_PROG_PKG_CONFIG |
|
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(pedantic, |
|
|
|
|
[AS_HELP_STRING([--enable-pedantic], |
|
|
|
@ -83,6 +104,15 @@ AC_ARG_ENABLE(dot, |
|
|
|
|
test "$enableval" = "yes" && HAVE_DOT="YES" || HAVE_DOT="NO"; |
|
|
|
|
AM_PATH_CPPUNIT([1.0.0], [have_cppunit="yes"], [have_cppunit="no"]) |
|
|
|
|
|
|
|
|
|
MINGW32=no |
|
|
|
|
MAC=no |
|
|
|
|
case $host_os in |
|
|
|
|
*mingw32*) MINGW32=yes;; |
|
|
|
|
*darwin* | *rhapsody* | *macosx*) MAC=yes;; |
|
|
|
|
esac |
|
|
|
|
AM_CONDITIONAL(MINGW32, test "$MINGW32" = "yes") |
|
|
|
|
AM_CONDITIONAL(MAC, test "$MAC" = "yes") |
|
|
|
|
|
|
|
|
|
# export macros |
|
|
|
|
SRCDIR=${srcdir} |
|
|
|
|
AC_SUBST(SRCDIR) |
|
|
|
@ -95,8 +125,6 @@ AC_SUBST(PACKAGENAME) |
|
|
|
|
AC_SUBST(AM_CXXFLAGS) |
|
|
|
|
AC_SUBST(AM_CPPFLAGS) |
|
|
|
|
AC_SUBST(LIBS) |
|
|
|
|
AC_SUBST(QMAKE) |
|
|
|
|
AC_SUBST(QMAKE_OPTIONS) |
|
|
|
|
|
|
|
|
|
# create output |
|
|
|
|
AC_OUTPUT |
|
|
|
@ -118,10 +146,3 @@ AC_MSG_NOTICE([Pedantic compile mode enabled! |
|
|
|
|
- all warnings for GNU g++ are enabled |
|
|
|
|
- all warnings result in an error |
|
|
|
|
- doxygen warnings are treated as error too]); fi |
|
|
|
|
if test "$build_win" == "yes"; then |
|
|
|
|
AC_MSG_NOTICE([Will cross-compile for windows |
|
|
|
|
Requires: |
|
|
|
|
- mingw32, mingw32-binutils, mingw32-runtime |
|
|
|
|
- i586-mingw32msvc-g++, i586-mingw32msvc-ar, |
|
|
|
|
i586-mingw32msvc-windres, i586-mingw32msvc-strip |
|
|
|
|
- Boost for MinGW in ~/.wine/drive_c/Programme/Boost-1.34.1]); fi |
|
|
|
|