1
0
mirror of https://github.com/OlafvdSpek/ctemplate.git synced 2025-09-28 19:05:49 +08:00
ctemplate/configure.ac
csilvers 2b0ea7691a Sun Apr 27 15:06:15 2008 Google Inc. <opensource@google.com>
* ctemplate: version 0.90 release
	* MAJOR NEW FEATURE: New "auto-escape" mode (jad, falmeida, mughda)
	* New tool, diff_tpl_auto_escape, to convert templates to auto-escaping
	* Fixed make install to install test datafiles (csilvers)
	* Add a new modifier: javascript_escape_with_arg=number (jad)
	* Javascript modifier now escapes all js newlines (msamuel)
2008-04-28 22:58:33 +00:00

93 lines
3.1 KiB
Plaintext

## Process this file with autoconf to produce configure.
## In general, the safest way to proceed is to run ./autogen.sh
# make sure we're interpreted by some minimal autoconf
AC_PREREQ(2.57)
AC_INIT(ctemplate, 0.90, opensource@google.com)
# The argument here is just something that should be in the current directory
# (for sanity checking)
AC_CONFIG_SRCDIR(README)
AM_INIT_AUTOMAKE([dist-zip])
AM_CONFIG_HEADER(src/config.h)
# Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc
# Uncomment this if you'll be exporting libraries (.so's)
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AX_C___ATTRIBUTE__
# Check whether some low-level functions/files are available
AC_HEADER_STDC
# Defines PRIuS
AC_COMPILER_CHARACTERISTICS
# Here are some examples of how to check for the existence of a fn or file
AC_CHECK_FUNCS(getopt_long)
##AC_CHECK_HEADERS(sys/resource.h)
AC_CHECK_TYPES([u_int16_t]) # defined in most posix systems
AC_CHECK_TYPES([__uint16]) # defined in some windows systems (vc7)
AC_HEADER_DIRENT # for template_unittest.cc, template_regtest.cc
# A lot of the code in this directory depends on pthreads
ACX_PTHREAD
# We'd like to use read/write locks in several places in the code.
# See if our pthreads support extends to that. Note: for linux, it
# does as long as you define _XOPEN_SOURCE appropriately.
AC_RWLOCK
# Find out what namespace 'normal' STL code lives in, and also what namespace
# the user wants our classes to be defined in
AC_CXX_STL_NAMESPACE
AC_DEFINE_GOOGLE_NAMESPACE(google)
# Figures out where hash_map and hash_set live, and what namespace they use
AC_CXX_STL_HASH
## Check out ../autoconf/ for other macros you can call to do useful stuff
AC_SUBST(ac_google_namespace)
AC_SUBST(ac_google_start_namespace)
AC_SUBST(ac_google_end_namespace)
AC_SUBST(ac_cv_cxx_hash_namespace)
AC_SUBST(ac_cv_cxx_hash_map)
AC_SUBST(ac_cv_cxx_hash_set)
if test "$ac_cv___attribute__" == "yes"; then
AC_SUBST(ac_google_attribute, 1)
else
AC_SUBST(ac_google_attribute, 0)
fi
# In unix (that is, using this script), this dll-export stuff will always
# be the empty string. In windows, we'll replace it with windows-specific
# text.
ac_windows_dllexport_defines=
ac_windows_dllexport=
AC_SUBST(ac_windows_dllexport_defines)
AC_SUBST(ac_windows_dllexport)
# This will (should) never change, but we put it here so if we do need
# to change it, to avoid naming conflicts or something, it's easy to
# do in one place.
ac_htmlparser_namespace=google_ctemplate_streamhtmlparser
AC_SUBST(ac_htmlparser_namespace)
AC_DEFINE_UNQUOTED(HTMLPARSER_NAMESPACE, $ac_htmlparser_namespace,
[The namespace to put the htmlparser code.])
# Write generated configuration file, and also .h files
AC_CONFIG_FILES([Makefile \
src/google/template_enums.h src/google/template_namelist.h \
src/google/template.h src/google/template_from_string.h \
src/google/template_modifiers.h src/google/template_emitter.h \
src/google/template_dictionary.h src/google/template_pathops.h \
])
AC_OUTPUT