comparison configure.in @ 92514:66d896123af5

(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.
author Glenn Morris <rgm@gnu.org>
date Wed, 05 Mar 2008 20:02:58 +0000
parents 9c883b96e06a
children 8b55b3cdebda
comparison
equal deleted inserted replaced
92513:4439a2625c76 92514:66d896123af5
1947 AC_DEFINE(XRegisterIMInstantiateCallback_arg6, [XPointer]) 1947 AC_DEFINE(XRegisterIMInstantiateCallback_arg6, [XPointer])
1948 fi 1948 fi
1949 CFLAGS=$late_CFLAGS 1949 CFLAGS=$late_CFLAGS
1950 fi 1950 fi
1951 1951
1952 #### For font-backend 1952 ### Start of font-backend section.
1953 if test "${USE_FONT_BACKEND}" != "no"; then 1953 if test "${HAVE_X11}" != "yes"; then
1954 1954 USE_FONT_BACKEND=no
1955 AC_DEFINE(USE_FONT_BACKEND, 1, 1955 fi
1956 [Define to 1 if we should use font-backend.]) 1956
1957 1957 if test "${USE_FONT_BACKEND}" = "yes"; then
1958 ### Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'. 1958 AC_DEFINE(USE_FONT_BACKEND, 1, [Define to 1 if we should use font-backend.])
1959 HAVE_XFT=maybe 1959
1960 if test "${HAVE_X11}" = "yes"; then 1960 ## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
1961 HAVE_XFT=maybe
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 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 1966
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"
1974 OLD_CFLAGS="$CFLAGS" 1970 OLD_CFLAGS="$CFLAGS"
1985 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" 1981 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
1986 else 1982 else
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
1993 fi 2013
1994 dnl For the "Does Emacs use" message at the end. 2014 HAVE_LIBOTF=no
1995 if test "$HAVE_XFT" != "yes"; then
1996 HAVE_XFT=no
1997 fi
1998
1999
2000 HAVE_FREETYPE=no
2001 ### Use -lfreetype if available, unless `--with-freetype=no'.
2002 if 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
2006 elif 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
2019 fi 2025 dnl FIXME should there be an error if HAVE_FREETYPE != yes?
2020 fi 2026 dnl Does the new font backend require it, or can it work without it?
2021 2027 fi
2022 HAVE_LIBOTF=no 2028
2023 if test "${HAVE_FREETYPE}" = "yes"; then 2029 HAVE_M17N_FLT=no
2024 AC_DEFINE(HAVE_FREETYPE, 1, 2030 if test "${with_m17n_flt}" != "no"; then
2025 [Define to 1 if you have freetype and fontconfig libraries.]) 2031 PKG_CHECK_MODULES(M17N_FLT, m17n-flt, HAVE_M17N_FLT=yes, HAVE_M17N_FLT=no)
2026 if test "${with_libotf}" != "no"; then 2032 if test "$HAVE_M17N_FLT" = "yes"; then
2027 dnl Check if --with-pkg-config-prog has been given. 2033 AC_DEFINE(HAVE_M17N_FLT, 1, [Define to 1 if using libm17n-flt.])
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, 2035 fi
2032 HAVE_LIBOTF=no) 2036
2033 if test "$HAVE_LIBOTF" = "yes"; then 2037 AC_SUBST(FREETYPE_CFLAGS)
2034 AC_DEFINE(HAVE_LIBOTF, 1, 2038 AC_SUBST(FREETYPE_LIBS)
2035 [Define to 1 if you have libotf library.]) 2039 AC_SUBST(FONTCONFIG_CFLAGS)
2036 fi 2040 AC_SUBST(FONTCONFIG_LIBS)
2037 fi 2041 AC_SUBST(LIBOTF_CFLAGS)
2038 fi 2042 AC_SUBST(LIBOTF_LIBS)
2039 2043 AC_SUBST(M17N_FLT_CFLAGS)
2040 HAVE_M17N_FLT=no 2044 AC_SUBST(M17N_FLT_LIBS)
2041 if test "${with_m17n_flt}" != "no"; then 2045
2042 dnl Check if --with-pkg-config-prog has been given. 2046 fi # "${USE_FONT_BACKEND}" = "yes"
2043 if test "X${with_pkg_config_prog}" != X; then 2047 ### End of font-backend section.
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
2053 fi
2054
2055 AC_SUBST(FREETYPE_CFLAGS)
2056 AC_SUBST(FREETYPE_LIBS)
2057 AC_SUBST(FONTCONFIG_CFLAGS)
2058 AC_SUBST(FONTCONFIG_LIBS)
2059 AC_SUBST(LIBOTF_CFLAGS)
2060 AC_SUBST(LIBOTF_LIBS)
2061 AC_SUBST(M17N_FLT_CFLAGS)
2062 AC_SUBST(M17N_FLT_LIBS)
2063
2064 fi
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'.
2068 HAVE_XPM=no 2050 HAVE_XPM=no
2069 if test "${HAVE_X11}" = "yes"; then 2051 if test "${HAVE_X11}" = "yes"; then
2070 if test "${with_xpm}" != "no"; then 2052 if test "${with_xpm}" != "no"; then