Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
126 lines (107 sloc) 2.66 KB
# configure.ac - tidyp GNU autoconf input file
AC_INIT([tidyp],[1.04],[andy@petdance.com])
AC_CONFIG_SRCDIR([src/tidyplib.c])
# Making releases:
#
# TIDY_MICRO_VERSION += 1;
# TIDY_INTERFACE_AGE += 1;
# TIDY_BINARY_AGE += 1;
#
# if any functions have been added, set TIDY_INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set TIDY_BINARY_AGE and TIDY_INTERFACE_AGE to 0.
#
TIDY_MAJOR_VERSION=1
TIDY_MINOR_VERSION=04
TIDY_MICRO_VERSION=0
TIDY_INTERFACE_AGE=0
TIDY_BINARY_AGE=0
LIBTIDY_VERSION=$TIDY_MAJOR_VERSION.$TIDY_MINOR_VERSION.$TIDY_MICRO_VERSION
AC_SUBST(LIBTIDY_VERSION)
# libtool versioning
#
LT_RELEASE=$TIDY_MAJOR_VERSION.$TIDY_MINOR_VERSION
LT_CURRENT=`expr $TIDY_MICRO_VERSION - $TIDY_INTERFACE_AGE`
LT_REVISION=$TIDY_INTERFACE_AGE
LT_AGE=`expr $TIDY_BINARY_AGE - $TIDY_INTERFACE_AGE`
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION, AC_PACKAGE_BUGREPORT)
# Checks for programs.
# =============================================
# AC_PROG_CC has a habit of adding -g to CFLAGS
#
save_cflags="$CFLAGS"
AC_PROG_CC
if test "x$GCC" = "xyes"; then
WARNING_CFLAGS="-Wall"
else
WARNING_CFLAGS=""
fi
AC_SUBST(WARNING_CFLAGS)
debug_build=no
AC_ARG_ENABLE(debug,[ --enable-debug add -g to CFLAGS],[
if test "x$enableval" = "xyes"; then
debug_build=yes
fi
])
if test $debug_build = yes; then
CFLAGS="$save_cflags -g"
else
CFLAGS="$save_cflags"
fi
#
# =============================================
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
support_access=yes
AC_ARG_ENABLE(access,[ --enable-access support accessibility checks],[
if test "x$enableval" = "xno"; then
support_access=no
fi
])
if test $support_access = yes; then
AC_DEFINE(SUPPORT_ACCESSIBILITY_CHECKS,1)
else
AC_DEFINE(SUPPORT_ACCESSIBILITY_CHECKS,0)
fi
support_utf16=yes
AC_ARG_ENABLE(utf16,[ --enable-utf16 support UTF-16 encoding],[
if test "x$enableval" = "xno"; then
support_utf16=no
fi
])
if test $support_utf16 = yes; then
AC_DEFINE(SUPPORT_UTF16_ENCODINGS,1)
else
AC_DEFINE(SUPPORT_UTF16_ENCODINGS,0)
fi
support_asian=yes
AC_ARG_ENABLE(asian,[ --enable-asian support asian encodings],[
if test "x$enableval" = "xno"; then
support_asian=no
fi
])
if test $support_asian = yes; then
AC_DEFINE(SUPPORT_ASIAN_ENCODINGS,1)
else
AC_DEFINE(SUPPORT_ASIAN_ENCODINGS,0)
fi
# TODO: this defines "WITH_DMALLOC" but tidy expects "DMALLOC"
# need to do: #if defined(DMALLOC) || defined(WITH_DMALLOC)
#
AM_WITH_DMALLOC
AC_CONFIG_FILES([
Makefile
src/Makefile
include/Makefile
bin/Makefile
tests/Makefile
])
AC_OUTPUT