Mercurial > emacs
comparison configure.in @ 102289:dce7aeb52608
* configure.in (HAVE_XFT, HAVE_FREETYPE, HAVE_LIBOTF)
(HAVE_M17N_FLT): Don't check for these unless HAVE_X11.
author | Adrian Robert <Adrian.B.Robert@gmail.com> |
---|---|
date | Thu, 26 Feb 2009 21:23:00 +0000 |
parents | 9688587d3982 |
children | 6c0a88c3e025 |
comparison
equal
deleted
inserted
replaced
102288:254c772b313f | 102289:dce7aeb52608 |
---|---|
1822 AC_DEFINE(XRegisterIMInstantiateCallback_arg6, [XPointer]) | 1822 AC_DEFINE(XRegisterIMInstantiateCallback_arg6, [XPointer]) |
1823 fi | 1823 fi |
1824 CFLAGS=$late_CFLAGS | 1824 CFLAGS=$late_CFLAGS |
1825 fi | 1825 fi |
1826 | 1826 |
1827 ### Start of font-backend section. | 1827 ### Start of font-backend (under any platform) section. |
1828 PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.2.0, HAVE_FC=yes, HAVE_FC=no) | 1828 # (nothing here yet -- this is a placeholder) |
1829 test "${HAVE_FC}" = "no" && with_freetype=no | 1829 ### End of font-backend (under any platform) section. |
1830 | |
1831 ### Start of font-backend (under X11) section. | |
1832 if 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'. |
1832 HAVE_XFT=maybe | 1837 HAVE_XFT=maybe |
1833 if 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"; |
1835 fi | 1840 fi |
1836 if 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)) |
1848 | 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 | |
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 |
1859 fi # "x${with_xft}" != "xno" | 1884 |
1860 | 1885 HAVE_LIBOTF=no |
1861 dnl For the "Does Emacs use" message at the end. | 1886 if test "${HAVE_FREETYPE}" = "yes"; then |
1862 if 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.]) |
1864 fi | 1889 if test "${with_libotf}" != "no"; then |
1865 | 1890 PKG_CHECK_MODULES(LIBOTF, libotf, HAVE_LIBOTF=yes, |
1866 | 1891 HAVE_LIBOTF=no) |
1867 HAVE_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.]) |
1869 if 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.]) |
1875 elif 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) | 1902 fi |
1878 fi | 1903 dnl FIXME should there be an error if HAVE_FREETYPE != yes? |
1879 | 1904 dnl Does the new font backend require it, or can it work without it? |
1880 HAVE_LIBOTF=no | 1905 fi |
1881 if test "${HAVE_FREETYPE}" = "yes"; then | 1906 |
1882 AC_DEFINE(HAVE_FREETYPE, 1, | 1907 HAVE_M17N_FLT=no |
1883 [Define to 1 if using the freetype and fontconfig libraries.]) | 1908 if test "${HAVE_LIBOTF}" = yes; then |
1884 if test "${with_libotf}" != "no"; then | 1909 if test "${with_m17n_flt}" != "no"; then |
1885 PKG_CHECK_MODULES(LIBOTF, libotf, HAVE_LIBOTF=yes, | 1910 PKG_CHECK_MODULES(M17N_FLT, m17n-flt, HAVE_M17N_FLT=yes, HAVE_M17N_FLT=no) |
1886 HAVE_LIBOTF=no) | 1911 if test "$HAVE_M17N_FLT" = "yes"; then |
1887 if test "$HAVE_LIBOTF" = "yes"; then | 1912 AC_DEFINE(HAVE_M17N_FLT, 1, [Define to 1 if using libm17n-flt.]) |
1888 AC_DEFINE(HAVE_LIBOTF, 1, [Define to 1 if using libotf.]) | 1913 fi |
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 | 1914 fi |
1896 fi | 1915 fi |
1897 fi | 1916 else |
1898 dnl FIXME should there be an error if HAVE_FREETYPE != yes? | 1917 HAVE_XFT=no |
1899 dnl Does the new font backend require it, or can it work without it? | 1918 HAVE_FREETYPE=no |
1900 fi | 1919 HAVE_LIBOTF=no |
1901 | 1920 HAVE_M17N_FLT=no |
1902 HAVE_M17N_FLT=no | 1921 fi |
1903 if test "${HAVE_LIBOTF}" = yes; then | 1922 ### End of font-backend (under X11) section. |
1904 if test "${with_m17n_flt}" != "no"; then | |
1905 PKG_CHECK_MODULES(M17N_FLT, m17n-flt, HAVE_M17N_FLT=yes, HAVE_M17N_FLT=no) | |
1906 if test "$HAVE_M17N_FLT" = "yes"; then | |
1907 AC_DEFINE(HAVE_M17N_FLT, 1, [Define to 1 if using libm17n-flt.]) | |
1908 fi | |
1909 fi | |
1910 fi | |
1911 | 1923 |
1912 AC_SUBST(FREETYPE_CFLAGS) | 1924 AC_SUBST(FREETYPE_CFLAGS) |
1913 AC_SUBST(FREETYPE_LIBS) | 1925 AC_SUBST(FREETYPE_LIBS) |
1914 AC_SUBST(FONTCONFIG_CFLAGS) | 1926 AC_SUBST(FONTCONFIG_CFLAGS) |
1915 AC_SUBST(FONTCONFIG_LIBS) | 1927 AC_SUBST(FONTCONFIG_LIBS) |
1916 AC_SUBST(LIBOTF_CFLAGS) | 1928 AC_SUBST(LIBOTF_CFLAGS) |
1917 AC_SUBST(LIBOTF_LIBS) | 1929 AC_SUBST(LIBOTF_LIBS) |
1918 AC_SUBST(M17N_FLT_CFLAGS) | 1930 AC_SUBST(M17N_FLT_CFLAGS) |
1919 AC_SUBST(M17N_FLT_LIBS) | 1931 AC_SUBST(M17N_FLT_LIBS) |
1920 | |
1921 ### End of font-backend section. | |
1922 | 1932 |
1923 ### Use -lXpm if available, unless `--with-xpm=no'. | 1933 ### Use -lXpm if available, unless `--with-xpm=no'. |
1924 HAVE_XPM=no | 1934 HAVE_XPM=no |
1925 if test "${HAVE_X11}" = "yes"; then | 1935 if test "${HAVE_X11}" = "yes"; then |
1926 if test "${with_xpm}" != "no"; then | 1936 if test "${with_xpm}" != "no"; then |