From 22ddf8fd3650072c6243941f27617158e111b236 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Wed, 13 Feb 2013 20:51:26 +0000 Subject: build-sys: move autotools files to subdirectories --- .gitignore | 7 +- Makefile.am | 2 +- acinclude.m4 | 231 -------------------------------------------------------- autogen.sh | 2 +- configure.ac | 2 + m4/acinclude.m4 | 231 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 237 insertions(+), 238 deletions(-) delete mode 100644 acinclude.m4 create mode 100644 m4/acinclude.m4 diff --git a/.gitignore b/.gitignore index 68c0bc1..624f76b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,17 +7,18 @@ Makefile Makefile.in # Exact wildcard, e.g., not in subdirs. -/*.m4 /doc/*.1 /doc/*.5 /doc/*/*.1 /doc/*/*.5 /nls/*/*.cat /nls/*/generated-*.m +/m4/*.m4 # Exact match, if a directory then everything in directory. /aclocal.m4 /autom4te.cache/ +/build-aux/ /config.h /config.h.in /config.log @@ -26,10 +27,6 @@ Makefile.in /data/apps /data/init /data/menu -/depcomp -/install-sh -/ltmain.sh -/missing /src/FbTk/libFbTk.a /src/defaults.cc /src/defaults.hh diff --git a/Makefile.am b/Makefile.am index 136824f..c98336b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ SUBDIRS = doc nls src util data MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in -ACLOCAL_AMFLAGS = -I . +ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = acinclude.m4 $(top_srcdir)/3rd/vim/* $(top_srcdir)/3rd/vim/syntax/* uninstall-hook: diff --git a/acinclude.m4 b/acinclude.m4 deleted file mode 100644 index a233530..0000000 --- a/acinclude.m4 +++ /dev/null @@ -1,231 +0,0 @@ -dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl -dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS -dnl -dnl The script must support `--cflags' and `--libs' args. -dnl If MINIMUM-VERSION is specified, the script must also support the -dnl `--version' arg. -dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given, -dnl it must also support `--prefix' and `--exec-prefix'. -dnl (In other words, it must be like gtk-config.) -dnl -dnl For example: -dnl -dnl AC_PATH_GENERIC(Foo, 1.0.0) -dnl -dnl would run `foo-config --version' and check that it is at least 1.0.0 -dnl -dnl If so, the following would then be defined: -dnl -dnl FOO_CFLAGS to `foo-config --cflags` -dnl FOO_LIBS to `foo-config --libs` -dnl -dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK) -dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount) -dnl -dnl @author Angus Lees -dnl @version $Id: ac_path_generic.m4,v 1.1.1.1 2001/07/26 00:46:28 guidod Exp $ - -AC_DEFUN([AC_PATH_GENERIC], -[dnl -dnl we're going to need uppercase, lowercase and user-friendly versions of the -dnl string `LIBRARY' -pushdef([UP], translit([$1], [a-z], [A-Z]))dnl -pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl - -dnl -dnl Get the cflags and libraries from the LIBRARY-config script -dnl -AC_ARG_WITH(DOWN-prefix,[ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)], - DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="") -AC_ARG_WITH(DOWN-exec-prefix,[ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)], - DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="") - - if test x$DOWN[]_config_exec_prefix != x ; then - DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix" - if test x${UP[]_CONFIG+set} != xset ; then - UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config - fi - fi - if test x$DOWN[]_config_prefix != x ; then - DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix" - if test x${UP[]_CONFIG+set} != xset ; then - UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config - fi - fi - - AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no) - ifelse([$2], , - AC_MSG_CHECKING(for $1), - AC_MSG_CHECKING(for $1 - version >= $2) - ) - no_[]DOWN="" - if test "$UP[]_CONFIG" = "no" ; then - no_[]DOWN=yes - else - UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`" - UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`" - ifelse([$2], , ,[ - DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \ - --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \ - --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \ - --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])" - DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])" - DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])" - - # Compare wanted version to what config script returned. - # If I knew what library was being run, i'd probably also compile - # a test program at this point (which also extracted and tested - # the version in some library-specific way) - if test "$DOWN[]_config_major_version" -lt \ - "$DOWN[]_wanted_major_version" \ - -o \( "$DOWN[]_config_major_version" -eq \ - "$DOWN[]_wanted_major_version" \ - -a "$DOWN[]_config_minor_version" -lt \ - "$DOWN[]_wanted_minor_version" \) \ - -o \( "$DOWN[]_config_major_version" -eq \ - "$DOWN[]_wanted_major_version" \ - -a "$DOWN[]_config_minor_version" -eq \ - "$DOWN[]_wanted_minor_version" \ - -a "$DOWN[]_config_micro_version" -lt \ - "$DOWN[]_wanted_micro_version" \) ; then - # older version found - no_[]DOWN=yes - echo -n "*** An old version of $1 " - echo -n "($DOWN[]_config_major_version" - echo -n ".$DOWN[]_config_minor_version" - echo ".$DOWN[]_config_micro_version) was found." - echo -n "*** You need a version of $1 newer than " - echo -n "$DOWN[]_wanted_major_version" - echo -n ".$DOWN[]_wanted_minor_version" - echo ".$DOWN[]_wanted_micro_version." - echo "***" - echo "*** If you have already installed a sufficiently new version, this error" - echo "*** probably means that the wrong copy of the DOWN-config shell script is" - echo "*** being found. The easiest way to fix this is to remove the old version" - echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the" - echo "*** correct copy of DOWN-config. (In this case, you will have to" - echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf" - echo "*** so that the correct libraries are found at run-time)" - fi - ]) - fi - if test "x$no_[]DOWN" = x ; then - AC_MSG_RESULT(yes) - ifelse([$3], , :, [$3]) - else - AC_MSG_RESULT(no) - if test "$UP[]_CONFIG" = "no" ; then - echo "*** The DOWN-config script installed by $1 could not be found" - echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the UP[]_CONFIG environment variable to the" - echo "*** full path to DOWN-config." - fi - UP[]_CFLAGS="" - UP[]_LIBS="" - ifelse([$4], , :, [$4]) - fi - AC_SUBST(UP[]_CFLAGS) - AC_SUBST(UP[]_LIBS) - - popdef([UP]) - popdef([DOWN]) -]) -# xft.m4 -# Copyright (c) 2002 Henrik Kinnunen (fluxgen at linuxmail.org) - -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -# AM_PATH_XFT1([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -AC_DEFUN([AM_PATH_XFT1], -[ - AC_CHECK_LIB(Xft, XftFontOpen, - XFT_LIBS="-lXft" - [$1], - [$2] - ) -]) - -# AM_PATH_XFT2([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -AC_DEFUN([AM_PATH_XFT2], -[ - if test x$pkg_exec_prefix != x ; then - xft_args="$xft_args --exec-prefix=$pkg_exec_prefix" - if test x${PKG_CONFIG+set} != xset ; then - PKG_CONFIG=$pkg_exec_prefix/bin/pkg-config - fi - fi - - if test x$xft_prefix != x ; then - xft_args="$xft_args --prefix=$xft_prefix" - if test x${PKG_CONFIG+set} != xset ; then - PKG_CONFIG=$xft_prefix/bin/pkg-config - fi - fi - - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - if test "x$PKG_CONFIG" = "xno" ; then - ifelse([$2], , :, [$2]) - else - XFT_CFLAGS=`$PKG_CONFIG $xftconf_args --cflags xft fontconfig` - XFT_LIBS=`$PKG_CONFIG $xftconf_args --libs xft fontconfig` - ifelse([$1], , :, [$1]) - fi -]) - -# AM_PATH_XFT(default-value, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -# Test for Xft, and define XFT_CFLAGS and XFT_LIBS -AC_DEFUN([AM_PATH_XFT], -[ - AC_ARG_WITH(xft-prefix,[ --with-xft-prefix=path Prefix where Xft is installed (optional)], - xft_prefix="$withval", xft_prefix="") - AC_ARG_WITH(pkg-exec-prefix,[ --with-pkg-exec-prefix=path Exec prefix where pkg-config is installed (optional)], - pkg_exec_prefix="$withval", pkg_exec_prefix="") - AC_ARG_ENABLE(xft, [ --enable-xft Xft (antialias) support (default=$1)], - if test "x$enableval" = "xyes"; then - TRY_XFT=yes - else - TRY_XFT=no - fi - , - TRY_XFT=$1 - ) - - if test "x$TRY_XFT" = "xyes"; then - AC_MSG_RESULT(yes) - AM_PATH_XFT2( - [$2], - # xft2 failed: try xft1 - AM_PATH_XFT1( - [$2], - [$3] - AC_MSG_RESULT([Cant find Xft libraries! Disabling Xft])) - ) - else - AC_MSG_RESULT(no) - [$3] - fi - - CFLAGS="$CFLAGS $XFT_CFLAGS" - CXXFLAGS="$CXXFLAGS $XFT_CFLAGS" - LIBS="$XFT_LIBS $LIBS" -]) diff --git a/autogen.sh b/autogen.sh index deabd5f..4831e1a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -14,7 +14,7 @@ dothis() { libtoolize --copy --force --automake rm -f config.cache -dothis aclocal -I . ${ACLOCAL_FLAGS} +dothis aclocal -I m4 ${ACLOCAL_FLAGS} dothis autoheader dothis automake -a -c dothis autoconf diff --git a/configure.ac b/configure.ac index e7b34ef..a7841b5 100644 --- a/configure.ac +++ b/configure.ac @@ -5,6 +5,8 @@ AC_INIT([fluxbox], [fluxbox-devel@lists.sourceforge.net],, [http://fluxbox.org/]) AC_CONFIG_SRCDIR([src/fluxbox.cc]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) AC_USE_SYSTEM_EXTENSIONS AM_INIT_AUTOMAKE([foreign 1.10 tar-pax dist-bzip2 subdir-objects]) diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 new file mode 100644 index 0000000..a233530 --- /dev/null +++ b/m4/acinclude.m4 @@ -0,0 +1,231 @@ +dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl +dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS +dnl +dnl The script must support `--cflags' and `--libs' args. +dnl If MINIMUM-VERSION is specified, the script must also support the +dnl `--version' arg. +dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given, +dnl it must also support `--prefix' and `--exec-prefix'. +dnl (In other words, it must be like gtk-config.) +dnl +dnl For example: +dnl +dnl AC_PATH_GENERIC(Foo, 1.0.0) +dnl +dnl would run `foo-config --version' and check that it is at least 1.0.0 +dnl +dnl If so, the following would then be defined: +dnl +dnl FOO_CFLAGS to `foo-config --cflags` +dnl FOO_LIBS to `foo-config --libs` +dnl +dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK) +dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount) +dnl +dnl @author Angus Lees +dnl @version $Id: ac_path_generic.m4,v 1.1.1.1 2001/07/26 00:46:28 guidod Exp $ + +AC_DEFUN([AC_PATH_GENERIC], +[dnl +dnl we're going to need uppercase, lowercase and user-friendly versions of the +dnl string `LIBRARY' +pushdef([UP], translit([$1], [a-z], [A-Z]))dnl +pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl + +dnl +dnl Get the cflags and libraries from the LIBRARY-config script +dnl +AC_ARG_WITH(DOWN-prefix,[ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)], + DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="") +AC_ARG_WITH(DOWN-exec-prefix,[ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)], + DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="") + + if test x$DOWN[]_config_exec_prefix != x ; then + DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix" + if test x${UP[]_CONFIG+set} != xset ; then + UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config + fi + fi + if test x$DOWN[]_config_prefix != x ; then + DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix" + if test x${UP[]_CONFIG+set} != xset ; then + UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config + fi + fi + + AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no) + ifelse([$2], , + AC_MSG_CHECKING(for $1), + AC_MSG_CHECKING(for $1 - version >= $2) + ) + no_[]DOWN="" + if test "$UP[]_CONFIG" = "no" ; then + no_[]DOWN=yes + else + UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`" + UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`" + ifelse([$2], , ,[ + DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \ + --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \ + --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \ + --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])" + DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])" + DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])" + + # Compare wanted version to what config script returned. + # If I knew what library was being run, i'd probably also compile + # a test program at this point (which also extracted and tested + # the version in some library-specific way) + if test "$DOWN[]_config_major_version" -lt \ + "$DOWN[]_wanted_major_version" \ + -o \( "$DOWN[]_config_major_version" -eq \ + "$DOWN[]_wanted_major_version" \ + -a "$DOWN[]_config_minor_version" -lt \ + "$DOWN[]_wanted_minor_version" \) \ + -o \( "$DOWN[]_config_major_version" -eq \ + "$DOWN[]_wanted_major_version" \ + -a "$DOWN[]_config_minor_version" -eq \ + "$DOWN[]_wanted_minor_version" \ + -a "$DOWN[]_config_micro_version" -lt \ + "$DOWN[]_wanted_micro_version" \) ; then + # older version found + no_[]DOWN=yes + echo -n "*** An old version of $1 " + echo -n "($DOWN[]_config_major_version" + echo -n ".$DOWN[]_config_minor_version" + echo ".$DOWN[]_config_micro_version) was found." + echo -n "*** You need a version of $1 newer than " + echo -n "$DOWN[]_wanted_major_version" + echo -n ".$DOWN[]_wanted_minor_version" + echo ".$DOWN[]_wanted_micro_version." + echo "***" + echo "*** If you have already installed a sufficiently new version, this error" + echo "*** probably means that the wrong copy of the DOWN-config shell script is" + echo "*** being found. The easiest way to fix this is to remove the old version" + echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the" + echo "*** correct copy of DOWN-config. (In this case, you will have to" + echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf" + echo "*** so that the correct libraries are found at run-time)" + fi + ]) + fi + if test "x$no_[]DOWN" = x ; then + AC_MSG_RESULT(yes) + ifelse([$3], , :, [$3]) + else + AC_MSG_RESULT(no) + if test "$UP[]_CONFIG" = "no" ; then + echo "*** The DOWN-config script installed by $1 could not be found" + echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the UP[]_CONFIG environment variable to the" + echo "*** full path to DOWN-config." + fi + UP[]_CFLAGS="" + UP[]_LIBS="" + ifelse([$4], , :, [$4]) + fi + AC_SUBST(UP[]_CFLAGS) + AC_SUBST(UP[]_LIBS) + + popdef([UP]) + popdef([DOWN]) +]) +# xft.m4 +# Copyright (c) 2002 Henrik Kinnunen (fluxgen at linuxmail.org) + +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# AM_PATH_XFT1([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +AC_DEFUN([AM_PATH_XFT1], +[ + AC_CHECK_LIB(Xft, XftFontOpen, + XFT_LIBS="-lXft" + [$1], + [$2] + ) +]) + +# AM_PATH_XFT2([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +AC_DEFUN([AM_PATH_XFT2], +[ + if test x$pkg_exec_prefix != x ; then + xft_args="$xft_args --exec-prefix=$pkg_exec_prefix" + if test x${PKG_CONFIG+set} != xset ; then + PKG_CONFIG=$pkg_exec_prefix/bin/pkg-config + fi + fi + + if test x$xft_prefix != x ; then + xft_args="$xft_args --prefix=$xft_prefix" + if test x${PKG_CONFIG+set} != xset ; then + PKG_CONFIG=$xft_prefix/bin/pkg-config + fi + fi + + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + if test "x$PKG_CONFIG" = "xno" ; then + ifelse([$2], , :, [$2]) + else + XFT_CFLAGS=`$PKG_CONFIG $xftconf_args --cflags xft fontconfig` + XFT_LIBS=`$PKG_CONFIG $xftconf_args --libs xft fontconfig` + ifelse([$1], , :, [$1]) + fi +]) + +# AM_PATH_XFT(default-value, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +# Test for Xft, and define XFT_CFLAGS and XFT_LIBS +AC_DEFUN([AM_PATH_XFT], +[ + AC_ARG_WITH(xft-prefix,[ --with-xft-prefix=path Prefix where Xft is installed (optional)], + xft_prefix="$withval", xft_prefix="") + AC_ARG_WITH(pkg-exec-prefix,[ --with-pkg-exec-prefix=path Exec prefix where pkg-config is installed (optional)], + pkg_exec_prefix="$withval", pkg_exec_prefix="") + AC_ARG_ENABLE(xft, [ --enable-xft Xft (antialias) support (default=$1)], + if test "x$enableval" = "xyes"; then + TRY_XFT=yes + else + TRY_XFT=no + fi + , + TRY_XFT=$1 + ) + + if test "x$TRY_XFT" = "xyes"; then + AC_MSG_RESULT(yes) + AM_PATH_XFT2( + [$2], + # xft2 failed: try xft1 + AM_PATH_XFT1( + [$2], + [$3] + AC_MSG_RESULT([Cant find Xft libraries! Disabling Xft])) + ) + else + AC_MSG_RESULT(no) + [$3] + fi + + CFLAGS="$CFLAGS $XFT_CFLAGS" + CXXFLAGS="$CXXFLAGS $XFT_CFLAGS" + LIBS="$XFT_LIBS $LIBS" +]) -- cgit v0.11.2