comparison configure.in @ 90918:e9f94688a064

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 781-792) - Update from CVS - Merge from gnus--rel--5.10 - Merge from emacs--rel--22 * emacs--rel--22 (patch 33-41) * gnus--rel--5.10 (patch 226-228) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-219
author Miles Bader <miles@gnu.org>
date Mon, 11 Jun 2007 00:58:11 +0000
parents 31beec9ee600 425fdad2ce24
children 3619e7770f2e
comparison
equal deleted inserted replaced
90917:9f1c3e957d3e 90918:e9f94688a064
82 dnl keep them together visually. 82 dnl keep them together visually.
83 AC_ARG_WITH(x-toolkit, 83 AC_ARG_WITH(x-toolkit,
84 [ --with-x-toolkit=KIT use an X toolkit 84 [ --with-x-toolkit=KIT use an X toolkit
85 (KIT = yes/lucid/athena/motif/gtk/no)], 85 (KIT = yes/lucid/athena/motif/gtk/no)],
86 [ case "${withval}" in 86 [ case "${withval}" in
87 y | ye | yes ) val=athena ;; 87 y | ye | yes ) val=gtk ;;
88 n | no ) val=no ;; 88 n | no ) val=no ;;
89 l | lu | luc | luci | lucid ) val=lucid ;; 89 l | lu | luc | luci | lucid ) val=lucid ;;
90 a | at | ath | athe | athen | athena ) val=athena ;; 90 a | at | ath | athe | athen | athena ) val=athena ;;
91 m | mo | mot | moti | motif ) val=motif ;; 91 m | mo | mot | moti | motif ) val=motif ;;
92 g | gt | gtk ) val=gtk ;; 92 g | gt | gtk ) val=gtk ;;
96 * ) 96 * )
97 dnl AC_MSG_ERROR([the `--with-x-toolkit' option is supposed to have a value 97 dnl AC_MSG_ERROR([the `--with-x-toolkit' option is supposed to have a value
98 dnl which is `yes', `no', `lucid', `athena', `motif' or `open-look'.]) 98 dnl which is `yes', `no', `lucid', `athena', `motif' or `open-look'.])
99 AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid\; 99 AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid\;
100 this option's value should be `yes', `no', `lucid', `athena', `motif' or `gtk'. 100 this option's value should be `yes', `no', `lucid', `athena', `motif' or `gtk'.
101 Currently, `yes', `athena' and `lucid' are synonyms.]) 101 Currently, `yes' and `gtk', and `athena' and `lucid' are synonyms.])
102 ;; 102 ;;
103 esac 103 esac
104 with_x_toolkit=$val 104 with_x_toolkit=$val
105 ]) 105 ])
106 AC_ARG_WITH(xpm, 106 AC_ARG_WITH(xpm,
1039 NON_GNU_CPP=/usr/ccs/lib/cpp 1039 NON_GNU_CPP=/usr/ccs/lib/cpp
1040 RANLIB="ar -ts" 1040 RANLIB="ar -ts"
1041 ;; 1041 ;;
1042 *-sunos5* | *-solaris* ) 1042 *-sunos5* | *-solaris* )
1043 opsys=sol2-6 1043 opsys=sol2-6
1044 ## FIXME: make this into a proper fix that checks the compiler type, 1044 emacs_check_sunpro_c=yes
1045 ## rather than relying on path. Or is /usr/ccs/lib/cpp a bad default now? 1045 NON_GNU_CPP=/usr/ccs/lib/cpp
1046 if [ "x$CC" = x/opt/SUNWspro/bin/cc ]; then
1047 ## -Xs prevents spurious whitespace.
1048 NON_GNU_CPP="/opt/SUNWspro/bin/cc -E -Xs"
1049 else
1050 NON_GNU_CPP=/usr/ccs/lib/cpp
1051 fi
1052 ;; 1046 ;;
1053 * ) opsys=bsd4-2 ;; 1047 * ) opsys=bsd4-2 ;;
1054 esac 1048 esac
1055 ## Watch out for a compiler that we know will not work. 1049 ## Watch out for a compiler that we know will not work.
1056 case "${canonical}" in 1050 case "${canonical}" in
1282 # On Suns, sometimes $CPP names a directory. 1276 # On Suns, sometimes $CPP names a directory.
1283 if test -n "$CPP" && test -d "$CPP"; then 1277 if test -n "$CPP" && test -d "$CPP"; then
1284 CPP= 1278 CPP=
1285 fi 1279 fi
1286 1280
1281 ## If not using gcc, and on Solaris, and no CPP specified, see if
1282 ## using a Sun compiler, which needs -Xs to prevent whitespace.
1283 if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
1284 test x"$CPP" = x; then
1285 AC_MSG_CHECKING([whether we are using a Sun C compiler])
1286 AC_CACHE_VAL(emacs_cv_sunpro_c,
1287 [AC_TRY_LINK([],
1288 [#ifndef __SUNPRO_C
1289 fail;
1290 #endif
1291 ], emacs_cv_sunpro_c=yes, emacs_cv_sunpro_c=no)])
1292 AC_MSG_RESULT($emacs_cv_sunpro_c)
1293
1294 if test x"$emacs_cv_sunpro_c" = xyes; then
1295 NON_GNU_CPP="$CC -E -Xs"
1296 fi
1297 fi
1298
1287 #### Some systems specify a CPP to use unless we are using GCC. 1299 #### Some systems specify a CPP to use unless we are using GCC.
1288 #### Now that we know whether we are using GCC, we can decide whether 1300 #### Now that we know whether we are using GCC, we can decide whether
1289 #### to use that one. 1301 #### to use that one.
1290 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x 1302 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
1291 then 1303 then
1875 gtk ) with_gtk=yes 1887 gtk ) with_gtk=yes
1876 dnl Dont set this for GTK. A lot of tests below assumes Xt when 1888 dnl Dont set this for GTK. A lot of tests below assumes Xt when
1877 dnl USE_X_TOOLKIT is set. 1889 dnl USE_X_TOOLKIT is set.
1878 USE_X_TOOLKIT=none ;; 1890 USE_X_TOOLKIT=none ;;
1879 no ) USE_X_TOOLKIT=none ;; 1891 no ) USE_X_TOOLKIT=none ;;
1880 dnl If user did not say whether to use a toolkit, 1892 dnl If user did not say whether to use a toolkit, make this decision later:
1881 dnl make this decision later: use the toolkit if we have X11R5 or newer. 1893 dnl use the toolkit if we have gtk, or X11R5 or newer.
1882 * ) USE_X_TOOLKIT=maybe ;; 1894 * )
1895 if test x"$with_gtk" = xyes; then
1896 USE_X_TOOLKIT=none
1897 else
1898 USE_X_TOOLKIT=maybe
1899 fi
1900 ;;
1883 esac 1901 esac
1884 ;; 1902 ;;
1885 mac | none ) 1903 mac | none )
1886 HAVE_X_WINDOWS=no 1904 HAVE_X_WINDOWS=no
1887 HAVE_X11=no 1905 HAVE_X11=no
2105 2123
2106 HAVE_GTK=no 2124 HAVE_GTK=no
2107 if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then 2125 if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
2108 USE_X_TOOLKIT=none 2126 USE_X_TOOLKIT=none
2109 fi 2127 fi
2110 if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then 2128 if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \
2129 test "$USE_X_TOOLKIT" = "maybe"; then
2111 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then 2130 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
2112 AC_MSG_ERROR([Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}]); 2131 AC_MSG_ERROR([Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}]);
2113 fi 2132 fi
2114 GLIB_REQUIRED=2.4 2133 GLIB_REQUIRED=2.4
2115 GTK_REQUIRED=2.4 2134 GTK_REQUIRED=2.4
2118 dnl Check if --with-pkg-config-prog has been given. 2137 dnl Check if --with-pkg-config-prog has been given.
2119 if test "X${with_pkg_config_prog}" != X; then 2138 if test "X${with_pkg_config_prog}" != X; then
2120 PKG_CONFIG="${with_pkg_config_prog}" 2139 PKG_CONFIG="${with_pkg_config_prog}"
2121 fi 2140 fi
2122 dnl Checks for libraries. 2141 dnl Checks for libraries.
2123 PKG_CHECK_MODULES(GTK, $GTK_MODULES) 2142 PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
2143 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
2144 AC_MSG_ERROR($GTK_PKG_ERRORS)
2145 fi
2146 fi
2147
2148
2149 if test x"$pkg_check_gtk" = xyes; then
2150
2124 AC_SUBST(GTK_CFLAGS) 2151 AC_SUBST(GTK_CFLAGS)
2125 AC_SUBST(GTK_LIBS) 2152 AC_SUBST(GTK_LIBS)
2126 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" 2153 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
2127 CFLAGS="$CFLAGS $GTK_CFLAGS" 2154 CFLAGS="$CFLAGS $GTK_CFLAGS"
2128 LIBS="$GTK_LIBS $LIBS" 2155 LIBS="$GTK_LIBS $LIBS"
2129 dnl Try to compile a simple GTK program. 2156 dnl Try to compile a simple GTK program.
2130 GTK_COMPILES=no 2157 GTK_COMPILES=no
2131 AC_CHECK_FUNCS(gtk_main, GTK_COMPILES=yes) 2158 AC_CHECK_FUNCS(gtk_main, GTK_COMPILES=yes)
2132 if test "${GTK_COMPILES}" != "yes"; then 2159 if test "${GTK_COMPILES}" != "yes"; then
2133 AC_MSG_ERROR([Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?]); 2160 if test "$USE_X_TOOLKIT" != "maybe"; then
2134 fi 2161 AC_MSG_ERROR([Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?]);
2135 2162 fi
2136 HAVE_GTK=yes 2163 else
2137 AC_DEFINE(HAVE_GTK, 1, [Define to 1 if using GTK.]) 2164 HAVE_GTK=yes
2138 USE_X_TOOLKIT=none 2165 AC_DEFINE(HAVE_GTK, 1, [Define to 1 if using GTK.])
2166 USE_X_TOOLKIT=none
2167 fi
2168
2169 fi
2170
2171
2172 if test "${HAVE_GTK}" = "yes"; then
2139 2173
2140 dnl GTK scrollbars resemble toolkit scrollbars a lot, so to avoid 2174 dnl GTK scrollbars resemble toolkit scrollbars a lot, so to avoid
2141 dnl a lot if #ifdef:s, say we have toolkit scrollbars. 2175 dnl a lot if #ifdef:s, say we have toolkit scrollbars.
2142 if test "$with_toolkit_scroll_bars" != no; then 2176 if test "$with_toolkit_scroll_bars" != no; then
2143 with_toolkit_scroll_bars=yes 2177 with_toolkit_scroll_bars=yes