aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Robert2009-02-26 21:23:17 +0000
committerAdrian Robert2009-02-26 21:23:17 +0000
commitc21273df00760b1cbb89552fe1db00b9f6df8f2b (patch)
treef155830a3b49cd4b683b45fc537dcd75df35bb75
parent3dc847a379c2b5538dcc857ac5fd16b86c8d0e54 (diff)
downloademacs-c21273df00760b1cbb89552fe1db00b9f6df8f2b.tar.gz
emacs-c21273df00760b1cbb89552fe1db00b9f6df8f2b.zip
* configure.in (HAVE_XFT, HAVE_FREETYPE, HAVE_LIBOTF)
(HAVE_M17N_FLT): Don't check for these unless HAVE_X11.
-rw-r--r--ChangeLog5
-rw-r--r--configure.in164
2 files changed, 92 insertions, 77 deletions
diff --git a/ChangeLog b/ChangeLog
index a2dd51357e2..abadf7c3de2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12009-02-23 Adrian Robert <Adrian.B.Robert@gmail.com>
2
3 * configure.in (HAVE_XFT, HAVE_FREETYPE, HAVE_LIBOTF)
4 (HAVE_M17N_FLT): Don't check for these unless HAVE_X11.
5
12009-02-04 Adrian Robert <Adrian.B.Robert@gmail.com> 62009-02-04 Adrian Robert <Adrian.B.Robert@gmail.com>
2 7
3 * configure.in (COCOA_EXPERIMENTAL_CTRL_G): Drop. 8 * configure.in (COCOA_EXPERIMENTAL_CTRL_G): Drop.
diff --git a/configure.in b/configure.in
index b29d2de2073..85ff104d5f6 100644
--- a/configure.in
+++ b/configure.in
@@ -1824,90 +1824,102 @@ either XPointer or XPointer*.])dnl
1824 CFLAGS=$late_CFLAGS 1824 CFLAGS=$late_CFLAGS
1825fi 1825fi
1826 1826
1827### Start of font-backend section. 1827### Start of font-backend (under any platform) section.
1828PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.2.0, HAVE_FC=yes, HAVE_FC=no) 1828# (nothing here yet -- this is a placeholder)
1829test "${HAVE_FC}" = "no" && with_freetype=no 1829### End of font-backend (under any platform) section.
1830
1831### Start of font-backend (under X11) section.
1832if test "${HAVE_X11}" = "yes"; then
1833 PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.2.0, HAVE_FC=yes, HAVE_FC=no)
1834 test "${HAVE_FC}" = "no" && with_freetype=no
1830 1835
1831## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'. 1836## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
1832HAVE_XFT=maybe 1837 HAVE_XFT=maybe
1833if test "x${with_freetype}" = "xno" || test "x${with_x}" = "xno"; then 1838 if test "x${with_freetype}" = "xno" || test "x${with_x}" = "xno"; then
1834 with_xft="no"; 1839 with_xft="no";
1835fi 1840 fi
1836if test "x${with_xft}" != "xno"; then 1841 if test "x${with_xft}" != "xno"; then
1837 1842
1838 PKG_CHECK_MODULES(XFT, xft >= 0.13.0, , HAVE_XFT=no) 1843 PKG_CHECK_MODULES(XFT, xft >= 0.13.0, , HAVE_XFT=no)
1839 if test "$HAVE_XFT" != no; then 1844 if test "$HAVE_XFT" != no; then
1840 OLD_CPPFLAGS="$CPPFLAGS" 1845 OLD_CPPFLAGS="$CPPFLAGS"
1841 OLD_CFLAGS="$CFLAGS" 1846 OLD_CFLAGS="$CFLAGS"
1842 OLD_LIBS="$LIBS" 1847 OLD_LIBS="$LIBS"
1843 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" 1848 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
1844 CFLAGS="$CFLAGS $XFT_CFLAGS" 1849 CFLAGS="$CFLAGS $XFT_CFLAGS"
1845 LIBS="$XFT_LIBS $LIBS" 1850 LIBS="$XFT_LIBS $LIBS"
1846 AC_CHECK_HEADER(X11/Xft/Xft.h, 1851 AC_CHECK_HEADER(X11/Xft/Xft.h,
1847 AC_CHECK_LIB(Xft, XftFontOpen, HAVE_XFT=yes, , $XFT_LIBS)) 1852 AC_CHECK_LIB(Xft, XftFontOpen, HAVE_XFT=yes, , $XFT_LIBS))
1853
1854 if test "${HAVE_XFT}" = "yes"; then
1855 AC_DEFINE(HAVE_XFT, 1, [Define to 1 if you have the Xft library.])
1856 AC_SUBST(XFT_LIBS)
1857 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
1858 else
1859 CPPFLAGS="$OLD_CPPFLAGS"
1860 CFLAGS="$OLD_CFLAGS"
1861 LIBS="$OLD_LIBS"
1862 fi # "${HAVE_XFT}" = "yes"
1863 fi # "$HAVE_XFT" != no
1864 fi # "x${with_xft}" != "xno"
1865
1866 dnl For the "Does Emacs use" message at the end.
1867 if test "$HAVE_XFT" != "yes"; then
1868 HAVE_XFT=no
1869 fi
1870
1848 1871
1872 HAVE_FREETYPE=no
1873 ### Use -lfreetype if available, unless `--with-freetype=no'.
1849 if test "${HAVE_XFT}" = "yes"; then 1874 if test "${HAVE_XFT}" = "yes"; then
1850 AC_DEFINE(HAVE_XFT, 1, [Define to 1 if you have the Xft library.]) 1875 dnl As we use Xft, we anyway use freetype.
1851 AC_SUBST(XFT_LIBS) 1876 dnl In this case, there's no need of additional CFLAGS and LIBS.
1852 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" 1877 HAVE_FREETYPE=yes
1853 else 1878 FONTCONFIG_CFLAGS=
1854 CPPFLAGS="$OLD_CPPFLAGS" 1879 FONTCONFIG_LIBS=
1855 CFLAGS="$OLD_CFLAGS" 1880 elif test "x${with_freetype}" != "xno" && test "x${with_x}" != "xno"; then
1856 LIBS="$OLD_LIBS" 1881
1857 fi # "${HAVE_XFT}" = "yes" 1882 PKG_CHECK_MODULES(FREETYPE, freetype2, HAVE_FREETYPE=yes, HAVE_FREETYPE=no)
1858 fi # "$HAVE_XFT" != no 1883 fi
1859fi # "x${with_xft}" != "xno" 1884
1860 1885 HAVE_LIBOTF=no
1861dnl For the "Does Emacs use" message at the end. 1886 if test "${HAVE_FREETYPE}" = "yes"; then
1862if test "$HAVE_XFT" != "yes"; then 1887 AC_DEFINE(HAVE_FREETYPE, 1,
1863 HAVE_XFT=no 1888 [Define to 1 if using the freetype and fontconfig libraries.])
1864fi 1889 if test "${with_libotf}" != "no"; then
1865 1890 PKG_CHECK_MODULES(LIBOTF, libotf, HAVE_LIBOTF=yes,
1866 1891 HAVE_LIBOTF=no)
1867HAVE_FREETYPE=no 1892 if test "$HAVE_LIBOTF" = "yes"; then
1868### Use -lfreetype if available, unless `--with-freetype=no'. 1893 AC_DEFINE(HAVE_LIBOTF, 1, [Define to 1 if using libotf.])
1869if test "${HAVE_XFT}" = "yes"; then 1894 AC_CHECK_LIB(otf, OTF_get_variation_glyphs,
1870 dnl As we use Xft, we anyway use freetype. 1895 HAVE_OTF_GET_VARIATION_GLYPHS=yes,
1871 dnl In this case, there's no need of additional CFLAGS and LIBS. 1896 HAVE_OTF_GET_VARIATION_GLYPHS=no)
1872 HAVE_FREETYPE=yes 1897 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
1873 FONTCONFIG_CFLAGS= 1898 AC_DEFINE(HAVE_OTF_GET_VARIATION_GLYPHS, 1,
1874 FONTCONFIG_LIBS= 1899 [Define to 1 if libotf has OTF_get_variation_glyphs.])
1875elif test "x${with_freetype}" != "xno" && test "x${with_x}" != "xno"; then 1900 fi
1876 1901 fi
1877 PKG_CHECK_MODULES(FREETYPE, freetype2, HAVE_FREETYPE=yes, HAVE_FREETYPE=no)
1878fi
1879
1880HAVE_LIBOTF=no
1881if test "${HAVE_FREETYPE}" = "yes"; then
1882 AC_DEFINE(HAVE_FREETYPE, 1,
1883 [Define to 1 if using the freetype and fontconfig libraries.])
1884 if test "${with_libotf}" != "no"; then
1885 PKG_CHECK_MODULES(LIBOTF, libotf, HAVE_LIBOTF=yes,
1886 HAVE_LIBOTF=no)
1887 if test "$HAVE_LIBOTF" = "yes"; then
1888 AC_DEFINE(HAVE_LIBOTF, 1, [Define to 1 if using libotf.])
1889 AC_CHECK_LIB(otf, OTF_get_variation_glyphs,
1890 HAVE_OTF_GET_VARIATION_GLYPHS=yes,
1891 HAVE_OTF_GET_VARIATION_GLYPHS=no)
1892 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
1893 AC_DEFINE(HAVE_OTF_GET_VARIATION_GLYPHS, 1,
1894 [Define to 1 if libotf has OTF_get_variation_glyphs.])
1895 fi 1902 fi
1903 dnl FIXME should there be an error if HAVE_FREETYPE != yes?
1904 dnl Does the new font backend require it, or can it work without it?
1896 fi 1905 fi
1897 fi
1898dnl FIXME should there be an error if HAVE_FREETYPE != yes?
1899dnl Does the new font backend require it, or can it work without it?
1900fi
1901 1906
1902HAVE_M17N_FLT=no 1907 HAVE_M17N_FLT=no
1903if test "${HAVE_LIBOTF}" = yes; then 1908 if test "${HAVE_LIBOTF}" = yes; then
1904 if test "${with_m17n_flt}" != "no"; then 1909 if test "${with_m17n_flt}" != "no"; then
1905 PKG_CHECK_MODULES(M17N_FLT, m17n-flt, HAVE_M17N_FLT=yes, HAVE_M17N_FLT=no) 1910 PKG_CHECK_MODULES(M17N_FLT, m17n-flt, HAVE_M17N_FLT=yes, HAVE_M17N_FLT=no)
1906 if test "$HAVE_M17N_FLT" = "yes"; then 1911 if test "$HAVE_M17N_FLT" = "yes"; then
1907 AC_DEFINE(HAVE_M17N_FLT, 1, [Define to 1 if using libm17n-flt.]) 1912 AC_DEFINE(HAVE_M17N_FLT, 1, [Define to 1 if using libm17n-flt.])
1913 fi
1914 fi
1908 fi 1915 fi
1909 fi 1916else
1917 HAVE_XFT=no
1918 HAVE_FREETYPE=no
1919 HAVE_LIBOTF=no
1920 HAVE_M17N_FLT=no
1910fi 1921fi
1922### End of font-backend (under X11) section.
1911 1923
1912AC_SUBST(FREETYPE_CFLAGS) 1924AC_SUBST(FREETYPE_CFLAGS)
1913AC_SUBST(FREETYPE_LIBS) 1925AC_SUBST(FREETYPE_LIBS)
@@ -1918,8 +1930,6 @@ AC_SUBST(LIBOTF_LIBS)
1918AC_SUBST(M17N_FLT_CFLAGS) 1930AC_SUBST(M17N_FLT_CFLAGS)
1919AC_SUBST(M17N_FLT_LIBS) 1931AC_SUBST(M17N_FLT_LIBS)
1920 1932
1921### End of font-backend section.
1922
1923### Use -lXpm if available, unless `--with-xpm=no'. 1933### Use -lXpm if available, unless `--with-xpm=no'.
1924HAVE_XPM=no 1934HAVE_XPM=no
1925if test "${HAVE_X11}" = "yes"; then 1935if test "${HAVE_X11}" = "yes"; then