*** empty log message ***
[m17n/m17n-lib.git] / configure.ac
index aa89e21..3b18fc9 100644 (file)
@@ -23,8 +23,8 @@ dnl 02111-1307, USA.
 
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT(m17n-lib, 1.0, m17n-lib-bug@m17n.org)
-AM_INIT_AUTOMAKE(m17n-lib, 1.0)
+AC_INIT(m17n-lib, 1.0.2, m17n-lib-bug@m17n.org)
+AM_INIT_AUTOMAKE(m17n-lib, 1.0.2)
 AM_CONFIG_HEADER(src/config.h)
 
 # Checks for programs for compiling.
@@ -91,7 +91,7 @@ CPPFLAGS=$save_CPPFLAGS
 if test "x$HAVE_OTF" = "xyes"; then
   AC_DEFINE(HAVE_OTF, 1, 
            [Define to 1 if you have OTF library and header file.])
-  OTF_LD_FLAGS="-lotf";
+  OTF_LD_FLAGS=`libotf-config --libs`
 fi
 AC_SUBST(OTF_LD_FLAGS)
 
@@ -104,13 +104,13 @@ if test "x$HAVE_FREETYPE_CONFIG" = "xyes"; then
   AC_CHECK_HEADER(ft2build.h, HAVE_FREETYPE=yes,
                              HAVE_FREETYPE=no CPPFLAGS=$save_CPPFLAGS)
   if test "x$HAVE_FREETYPE" = "xyes" ; then
-    FREETYPE_LD_FLAGS=`freetype-config --libs`;
     save_LIBS=$LIBS
-    LIBS="$LIBS $FREETYPE_LD_FLAGS"
+    LIBS="$LIBS `freetype-config --libs`"
     AC_CHECK_LIB(freetype, FT_Init_FreeType, HAVE_FREETYPE=yes,
                                             HAVE_FREETYPE=no)
     LIBS=$save_LIBS
     if test "x$HAVE_FREETYPE" = "xyes"; then
+      FREETYPE_LD_FLAGS=`freetype-config --libtool`
       AC_DEFINE(HAVE_FREETYPE, 1, 
                [Define to 1 if you have FreeType library and header file.])
     fi
@@ -118,6 +118,23 @@ if test "x$HAVE_FREETYPE_CONFIG" = "xyes"; then
 fi
 AC_SUBST(FREETYPE_LD_FLAGS)
 
+# Check for Xft2 usability.
+AC_CHECK_LIB(Xft, XftDrawCreate, HAVE_XFT2=yes, HAVE_XFT2=no)
+if test "x$HAVE_XFT2" = "xyes"; then
+  AC_CHECK_HEADER(X11/Xft/Xft.h, HAVE_XFT2=yes, HAVE_XFT2=no, 
+                 [#include <X11/Xft/Xft.h>
+#if XftVersion >= 20000
+#else
+Version too old.  Compiling this line should fail.
+#endif])
+  if test "x$HAVE_XFT2" = "xyes"; then
+    AC_DEFINE(HAVE_XFT2, 1,
+            [Define to 1 if you have Xft2 library and header file.])
+    XFT2_LD_FLAGS="-lXft"
+  fi
+fi
+AC_SUBST(XFT2_LD_FLAGS)
+
 # Check for libxml2 usability.
 AC_CHECK_LIB(xml2, xmlParseMemory, HAVE_XML2=yes, HAVE_XML2=no)
 if test "x$HAVE_XML2" = "xyes"; then