aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-03-05 20:02:58 +0000
committerGlenn Morris2008-03-05 20:02:58 +0000
commit46bb649d857c0deb75d7a887d2d819dc39bca366 (patch)
treed8696f4347a953afe51a91bb0e859a4815e9fb04
parente4434eccdb57237e755cc8f9aa8bf34213ce1bd2 (diff)
downloademacs-46bb649d857c0deb75d7a887d2d819dc39bca366.tar.gz
emacs-46bb649d857c0deb75d7a887d2d819dc39bca366.zip
(USE_FONT_BACKEND): Set to "no" in absence of X.
(PKG_CONFIG): Don't set multiple times, once is enough. (HAVE_FREETYPE, HAVE_LIBOTF, HAVE_M17N_FLT): Tweak config.in text.
-rw-r--r--configure.in142
1 files changed, 62 insertions, 80 deletions
diff --git a/configure.in b/configure.in
index 0c4ab12ca88..e8a7ab20e04 100644
--- a/configure.in
+++ b/configure.in
@@ -1949,25 +1949,21 @@ either XPointer or XPointer*.])dnl
1949 CFLAGS=$late_CFLAGS 1949 CFLAGS=$late_CFLAGS
1950fi 1950fi
1951 1951
1952#### For font-backend 1952### Start of font-backend section.
1953if test "${USE_FONT_BACKEND}" != "no"; then 1953if test "${HAVE_X11}" != "yes"; then
1954 USE_FONT_BACKEND=no
1955fi
1954 1956
1955AC_DEFINE(USE_FONT_BACKEND, 1, 1957if test "${USE_FONT_BACKEND}" = "yes"; then
1956 [Define to 1 if we should use font-backend.]) 1958 AC_DEFINE(USE_FONT_BACKEND, 1, [Define to 1 if we should use font-backend.])
1957 1959
1958### Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'. 1960 ## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
1959HAVE_XFT=maybe 1961 HAVE_XFT=maybe
1960if test "${HAVE_X11}" = "yes"; then
1961 if test "x${with_freetype}" = "xno"; then 1962 if test "x${with_freetype}" = "xno"; then
1962 with_xft="no"; 1963 with_xft="no";
1963 fi 1964 fi
1964 if test "x${with_xft}" != "xno"; then 1965 if test "x${with_xft}" != "xno"; then
1965 1966
1966 dnl Check if --with-pkg-config-prog has been given.
1967 if test "X${with_pkg_config_prog}" != X; then
1968 PKG_CONFIG="${with_pkg_config_prog}"
1969 fi
1970
1971 PKG_CHECK_MODULES(XFT, xft >= 0.13.0, , HAVE_XFT=no) 1967 PKG_CHECK_MODULES(XFT, xft >= 0.13.0, , HAVE_XFT=no)
1972 if test "$HAVE_XFT" != no; then 1968 if test "$HAVE_XFT" != no; then
1973 OLD_CPPFLAGS="$CPPFLAGS" 1969 OLD_CPPFLAGS="$CPPFLAGS"
@@ -1987,82 +1983,68 @@ if test "${HAVE_X11}" = "yes"; then
1987 CPPFLAGS="$OLD_CPPFLAGS" 1983 CPPFLAGS="$OLD_CPPFLAGS"
1988 CFLAGS="$OLD_CFLAGS" 1984 CFLAGS="$OLD_CFLAGS"
1989 LIBS="$OLD_LIBS" 1985 LIBS="$OLD_LIBS"
1986 fi # "${HAVE_XFT}" = "yes"
1987 fi # "$HAVE_XFT" != no
1988 fi # "x${with_xft}" != "xno"
1989
1990 dnl For the "Does Emacs use" message at the end.
1991 if test "$HAVE_XFT" != "yes"; then
1992 HAVE_XFT=no
1993 fi
1994
1995
1996 HAVE_FREETYPE=no
1997 ### Use -lfreetype if available, unless `--with-freetype=no'.
1998 if test "${HAVE_XFT}" = "yes"; then
1999 dnl As we use Xft, we anyway use freetype.
2000 dnl In this case, there's no need of additional CFLAGS and LIBS.
2001 HAVE_FREETYPE=yes
2002 elif test "x${with_freetype}" != "xno"; then
2003
2004 PKG_CHECK_MODULES(FREETYPE, freetype2, HAVE_FREETYPE=yes, HAVE_FREETYPE=no)
2005 if test "${HAVE_FREETYPE}" = "yes"; then
2006 PKG_CHECK_MODULES(FONTCONFIG, fontconfig, HAVE_FC=yes, HAVE_FC=no)
2007 if test "${HAVE_FC}" = "no"; then
2008 dnl Without fontconfig, we can't use freetype at the moment.
2009 HAVE_FREETYPE=no
1990 fi 2010 fi
1991 fi 2011 fi
1992 fi 2012 fi
1993fi 2013
1994dnl For the "Does Emacs use" message at the end. 2014 HAVE_LIBOTF=no
1995if test "$HAVE_XFT" != "yes"; then
1996 HAVE_XFT=no
1997fi
1998
1999
2000HAVE_FREETYPE=no
2001### Use -lfreetype if available, unless `--with-freetype=no'.
2002if test "${HAVE_XFT}" = "yes"; then
2003 dnl As we use Xft, we anyway use freetype.
2004 dnl In this case, there's no need of additional CFLAGS and LIBS.
2005 HAVE_FREETYPE=yes
2006elif test "x${with_freetype}" != "xno"; then
2007 dnl Check if --with-pkg-config-prog has been given.
2008 if test "X${with_pkg_config_prog}" != X; then
2009 PKG_CONFIG="${with_pkg_config_prog}"
2010 fi
2011
2012 PKG_CHECK_MODULES(FREETYPE, freetype2, HAVE_FREETYPE=yes, HAVE_FREETYPE=no)
2013 if test "${HAVE_FREETYPE}" = "yes"; then 2015 if test "${HAVE_FREETYPE}" = "yes"; then
2014 PKG_CHECK_MODULES(FONTCONFIG, fontconfig, HAVE_FC=yes, HAVE_FC=no) 2016 AC_DEFINE(HAVE_FREETYPE, 1,
2015 if test "${HAVE_FC}" = "no"; then 2017 [Define to 1 if using the freetype and fontconfig libraries.])
2016 dnl Witout fontconfig, we can't use freetype at the moment. 2018 if test "${with_libotf}" != "no"; then
2017 HAVE_FREETYPE=no 2019 PKG_CHECK_MODULES(LIBOTF, libotf, HAVE_LIBOTF=yes,
2020 HAVE_LIBOTF=no)
2021 if test "$HAVE_LIBOTF" = "yes"; then
2022 AC_DEFINE(HAVE_LIBOTF, 1, [Define to 1 if using libotf.])
2023 fi
2018 fi 2024 fi
2025dnl FIXME should there be an error if HAVE_FREETYPE != yes?
2026dnl Does the new font backend require it, or can it work without it?
2019 fi 2027 fi
2020fi 2028
2021 2029 HAVE_M17N_FLT=no
2022HAVE_LIBOTF=no 2030 if test "${with_m17n_flt}" != "no"; then
2023if test "${HAVE_FREETYPE}" = "yes"; then 2031 PKG_CHECK_MODULES(M17N_FLT, m17n-flt, HAVE_M17N_FLT=yes, HAVE_M17N_FLT=no)
2024 AC_DEFINE(HAVE_FREETYPE, 1, 2032 if test "$HAVE_M17N_FLT" = "yes"; then
2025 [Define to 1 if you have freetype and fontconfig libraries.]) 2033 AC_DEFINE(HAVE_M17N_FLT, 1, [Define to 1 if using libm17n-flt.])
2026 if test "${with_libotf}" != "no"; then
2027 dnl Check if --with-pkg-config-prog has been given.
2028 if test "X${with_pkg_config_prog}" != X; then
2029 PKG_CONFIG="${with_pkg_config_prog}"
2030 fi 2034 fi
2031 PKG_CHECK_MODULES(LIBOTF, libotf, HAVE_LIBOTF=yes,
2032 HAVE_LIBOTF=no)
2033 if test "$HAVE_LIBOTF" = "yes"; then
2034 AC_DEFINE(HAVE_LIBOTF, 1,
2035 [Define to 1 if you have libotf library.])
2036 fi
2037 fi
2038fi
2039
2040HAVE_M17N_FLT=no
2041if test "${with_m17n_flt}" != "no"; then
2042 dnl Check if --with-pkg-config-prog has been given.
2043 if test "X${with_pkg_config_prog}" != X; then
2044 PKG_CONFIG="${with_pkg_config_prog}"
2045 fi
2046 dnl Checks for libraries.
2047 PKG_CHECK_MODULES(M17N_FLT, m17n-flt, HAVE_M17N_FLT=yes,
2048 HAVE_M17N_FLT=no)
2049 if test "$HAVE_M17N_FLT" = "yes"; then
2050 AC_DEFINE(HAVE_M17N_FLT, 1,
2051 [Define to 1 if you have m17n-flt library.])
2052 fi 2035 fi
2053fi 2036
2054 2037 AC_SUBST(FREETYPE_CFLAGS)
2055AC_SUBST(FREETYPE_CFLAGS) 2038 AC_SUBST(FREETYPE_LIBS)
2056AC_SUBST(FREETYPE_LIBS) 2039 AC_SUBST(FONTCONFIG_CFLAGS)
2057AC_SUBST(FONTCONFIG_CFLAGS) 2040 AC_SUBST(FONTCONFIG_LIBS)
2058AC_SUBST(FONTCONFIG_LIBS) 2041 AC_SUBST(LIBOTF_CFLAGS)
2059AC_SUBST(LIBOTF_CFLAGS) 2042 AC_SUBST(LIBOTF_LIBS)
2060AC_SUBST(LIBOTF_LIBS) 2043 AC_SUBST(M17N_FLT_CFLAGS)
2061AC_SUBST(M17N_FLT_CFLAGS) 2044 AC_SUBST(M17N_FLT_LIBS)
2062AC_SUBST(M17N_FLT_LIBS) 2045
2063 2046fi # "${USE_FONT_BACKEND}" = "yes"
2064fi 2047### End of font-backend section.
2065#### End for font-backend
2066 2048
2067### Use -lXpm if available, unless `--with-xpm=no'. 2049### Use -lXpm if available, unless `--with-xpm=no'.
2068HAVE_XPM=no 2050HAVE_XPM=no