1 AC_INIT(README) 2 AM_INIT_AUTOMAKE(harfbuzz, 0.1) 3 AC_PROG_CC 4 AC_PROG_CXX 5 AM_PROG_LIBTOOL 6 PKG_PROG_PKG_CONFIG 7 AM_CONFIG_HEADER(config.h) 8 9 if test "x$ac_compiler_gnu" = xyes; then 10 CFLAGS="$CFLAGS -Wall -W -pedantic -ansi" 11 CXXFLAGS="$CXXFLAGS -Wall -W" 12 fi 13 14 AC_PATH_PROG(ft_config,freetype-config,no) 15 if test "$ft_config" = "no"; then 16 AC_MSG_ERROR([You must have freetype installed; see http://www.freetype.org/]) 17 fi 18 19 FREETYPE_CFLAGS="`$ft_config --cflags`" 20 FREETYPE_LIBS="`$ft_config --libs`" 21 22 AC_SUBST(FREETYPE_LIBS) 23 AC_SUBST(FREETYPE_CFLAGS) 24 25 AC_ARG_ENABLE(qt, AS_HELP_STRING([--disable-qt], [Build Qt support (default: auto)]), [QT=$enableval], [QT=auto]) 26 27 if test "x$QT" = xauto; then 28 PKG_CHECK_MODULES(QT, [QtGui >= 4.3], [QT=yes], [QT=no]) 29 fi 30 if test "x$QT" = xyes; then 31 PKG_CHECK_MODULES(QT_GUI, [QtGui >= 4.3]) 32 PKG_CHECK_MODULES(QT_QTEST, [QtTest >= 4.3]) 33 34 _PKG_CONFIG(QT_INCDIR, [variable=includedir], [QtGui >= 4.3]) 35 QT_GUI_CFLAGS="$QT_GUI_CFLAGS -I$pkg_cv_QT_INCDIR/../Qt" 36 37 AC_SUBST(QT_GUI_CFLAGS) 38 AC_SUBST(QT_GUI_LIBS) 39 AC_SUBST(QT_QTEST_CFLAGS) 40 AC_SUBST(QT_QTEST_LIBS) 41 42 _PKG_CONFIG(QT_MOC, [variable=moc_location], [QtGui >= 4.3]) 43 QT_MOC=$pkg_cv_QT_MOC 44 AC_SUBST(QT_MOC) 45 fi 46 AM_CONDITIONAL(QT, [test "x$QT" = xyes]) 47 48 AC_OUTPUT([ 49 Makefile 50 src/Makefile 51 tests/Makefile 52 tests/linebreaking/Makefile 53 tests/shaping/Makefile 54 ]) 55