1AC_PREREQ(2.54) 2 3AC_INIT(silgraphite-xft, 2.2.0, silgraphite-devel@lists.sourceforge.net) 4AC_CONFIG_MACRO_DIR([m4]) 5AC_CONFIG_SRCDIR(XftGrFont.cpp) 6AC_CONFIG_AUX_DIR(config) 7 8# setup automake 9AM_INIT_AUTOMAKE(foreign) 10AM_MAINTAINER_MODE 11 12# System checks. 13AC_C_BIGENDIAN 14 15# Optional features 16AC_ARG_ENABLE(tracing, 17 AC_HELP_STRING([--enable-tracing], 18 [build with support for trace Graphite logs (default=no)]), 19 [tracing_enabled=yes], [tracing_enabled=no]) 20AC_ARG_ENABLE(debug, 21 AC_HELP_STRING([--enable-debug], 22 [build with debugging. (default=no)]), 23 [enable_debug=yes], [enable_debug=no]) 24AC_ARG_ENABLE(final, 25 AC_HELP_STRING([--enable-final], 26 [build with optimizations and no debugging. (default=no)]), 27 [enable_final=yes], [enable_final=no]) 28AC_ARG_ENABLE(profile, 29 AC_HELP_STRING([--enable-profile], 30 [allow profiling (default=no)]), 31 [enable_profile=yes], [enable_profile=no]) 32AC_ARG_ENABLE(profilefn, 33 AC_HELP_STRING([--enable-profilefn], 34 [allow functioncheck profiling (default=no)]), 35 [enable_profilefn=yes],[enable_profilefn=no]) 36 37# Checks for programs. 38AC_PROG_CXX 39AC_LANG_CPLUSPLUS 40AC_PROG_INSTALL 41AC_PROG_LIBTOOL 42 43# Checks for external dependencies 44PKG_CHECK_MODULES(XFT, xft) 45PKG_CHECK_MODULES(GR2, silgraphite >= 2.2.0) 46PKG_CHECK_MODULES(GRFT, silgraphite-ft) 47 48# Checks for header files. 49AC_HEADER_STDC 50 51# Checks for typedefs, structures, and compiler characteristics. 52# Checks for library functions. 53 54# Setup the build compiler flags and linker flags. 55# Enable debug 56build_flags="" 57if test "$enable_debug" = yes; then 58 build_flags="$build_flags -O0 -g -Wall -Wno-unknown-pragmas -Wparentheses -Werror" 59else 60 build_flags="$build_flags -DNDEBUG" 61fi 62 63# Enable Graphite Trace logs - these are only used if a 64# LayoutEnvironment has a valid ostream pointer 65if test "$enable_tracing" = yes; then 66 build_flags="$build_flags -DTRACING" 67fi 68 69# Enable final 70if test "$enable_final" = yes; then 71 build_flags="$build_flags -O3 -DNDEBUG" 72fi 73 74# Enable profile 75if test "$enable_profile" = yes; then 76 build_flags="$build_flags -pg " 77fi 78if test "$enable_profilefn" = yes; then 79 build_flags="$build_flags -g -finstrument-functions " 80 LIBS="$LIBS -g -finstrument-functions -lfnccheck " 81fi 82 83CFLAGS="$CFLAGS $build_flags" 84CXXFLAGS="$CXXFLAGS $build_flags" 85 86AC_CONFIG_FILES(Makefile \ 87 silgraphite-xft.pc:installed-top.pc.in:silgraphite-xft.pc.in \ 88 silgraphite-xft-uninstalled.pc:uninstalled-top.pc.in:silgraphite-xft.pc.in) 89 90AC_OUTPUT 91