Mercurial > emacs
comparison configure.in @ 83632:cc587bfd19ca
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--multi-tty--0--patch-21
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 11 Jun 2007 01:00:07 +0000 |
parents | 422451dd396a 425fdad2ce24 |
children | 9c01792a3ce8 |
comparison
equal
deleted
inserted
replaced
83631:7d63b897231b | 83632:cc587bfd19ca |
---|---|
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, |
1030 NON_GNU_CPP=/usr/ccs/lib/cpp | 1030 NON_GNU_CPP=/usr/ccs/lib/cpp |
1031 RANLIB="ar -ts" | 1031 RANLIB="ar -ts" |
1032 ;; | 1032 ;; |
1033 *-sunos5* | *-solaris* ) | 1033 *-sunos5* | *-solaris* ) |
1034 opsys=sol2-6 | 1034 opsys=sol2-6 |
1035 ## FIXME: make this into a proper fix that checks the compiler type, | 1035 emacs_check_sunpro_c=yes |
1036 ## rather than relying on path. Or is /usr/ccs/lib/cpp a bad default now? | 1036 NON_GNU_CPP=/usr/ccs/lib/cpp |
1037 if [ "x$CC" = x/opt/SUNWspro/bin/cc ]; then | |
1038 ## -Xs prevents spurious whitespace. | |
1039 NON_GNU_CPP="/opt/SUNWspro/bin/cc -E -Xs" | |
1040 else | |
1041 NON_GNU_CPP=/usr/ccs/lib/cpp | |
1042 fi | |
1043 ;; | 1037 ;; |
1044 * ) opsys=bsd4-2 ;; | 1038 * ) opsys=bsd4-2 ;; |
1045 esac | 1039 esac |
1046 ## Watch out for a compiler that we know will not work. | 1040 ## Watch out for a compiler that we know will not work. |
1047 case "${canonical}" in | 1041 case "${canonical}" in |
1273 # On Suns, sometimes $CPP names a directory. | 1267 # On Suns, sometimes $CPP names a directory. |
1274 if test -n "$CPP" && test -d "$CPP"; then | 1268 if test -n "$CPP" && test -d "$CPP"; then |
1275 CPP= | 1269 CPP= |
1276 fi | 1270 fi |
1277 | 1271 |
1272 ## If not using gcc, and on Solaris, and no CPP specified, see if | |
1273 ## using a Sun compiler, which needs -Xs to prevent whitespace. | |
1274 if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ | |
1275 test x"$CPP" = x; then | |
1276 AC_MSG_CHECKING([whether we are using a Sun C compiler]) | |
1277 AC_CACHE_VAL(emacs_cv_sunpro_c, | |
1278 [AC_TRY_LINK([], | |
1279 [#ifndef __SUNPRO_C | |
1280 fail; | |
1281 #endif | |
1282 ], emacs_cv_sunpro_c=yes, emacs_cv_sunpro_c=no)]) | |
1283 AC_MSG_RESULT($emacs_cv_sunpro_c) | |
1284 | |
1285 if test x"$emacs_cv_sunpro_c" = xyes; then | |
1286 NON_GNU_CPP="$CC -E -Xs" | |
1287 fi | |
1288 fi | |
1289 | |
1278 #### Some systems specify a CPP to use unless we are using GCC. | 1290 #### Some systems specify a CPP to use unless we are using GCC. |
1279 #### Now that we know whether we are using GCC, we can decide whether | 1291 #### Now that we know whether we are using GCC, we can decide whether |
1280 #### to use that one. | 1292 #### to use that one. |
1281 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x | 1293 if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x |
1282 then | 1294 then |
1866 gtk ) with_gtk=yes | 1878 gtk ) with_gtk=yes |
1867 dnl Dont set this for GTK. A lot of tests below assumes Xt when | 1879 dnl Dont set this for GTK. A lot of tests below assumes Xt when |
1868 dnl USE_X_TOOLKIT is set. | 1880 dnl USE_X_TOOLKIT is set. |
1869 USE_X_TOOLKIT=none ;; | 1881 USE_X_TOOLKIT=none ;; |
1870 no ) USE_X_TOOLKIT=none ;; | 1882 no ) USE_X_TOOLKIT=none ;; |
1871 dnl If user did not say whether to use a toolkit, | 1883 dnl If user did not say whether to use a toolkit, make this decision later: |
1872 dnl make this decision later: use the toolkit if we have X11R5 or newer. | 1884 dnl use the toolkit if we have gtk, or X11R5 or newer. |
1873 * ) USE_X_TOOLKIT=maybe ;; | 1885 * ) |
1886 if test x"$with_gtk" = xyes; then | |
1887 USE_X_TOOLKIT=none | |
1888 else | |
1889 USE_X_TOOLKIT=maybe | |
1890 fi | |
1891 ;; | |
1874 esac | 1892 esac |
1875 ;; | 1893 ;; |
1876 mac | none ) | 1894 mac | none ) |
1877 HAVE_X_WINDOWS=no | 1895 HAVE_X_WINDOWS=no |
1878 HAVE_X11=no | 1896 HAVE_X11=no |
2096 | 2114 |
2097 HAVE_GTK=no | 2115 HAVE_GTK=no |
2098 if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then | 2116 if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then |
2099 USE_X_TOOLKIT=none | 2117 USE_X_TOOLKIT=none |
2100 fi | 2118 fi |
2101 if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then | 2119 if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \ |
2120 test "$USE_X_TOOLKIT" = "maybe"; then | |
2102 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then | 2121 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then |
2103 AC_MSG_ERROR([Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}]); | 2122 AC_MSG_ERROR([Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}]); |
2104 fi | 2123 fi |
2105 GLIB_REQUIRED=2.4 | 2124 GLIB_REQUIRED=2.4 |
2106 GTK_REQUIRED=2.4 | 2125 GTK_REQUIRED=2.4 |
2109 dnl Check if --with-pkg-config-prog has been given. | 2128 dnl Check if --with-pkg-config-prog has been given. |
2110 if test "X${with_pkg_config_prog}" != X; then | 2129 if test "X${with_pkg_config_prog}" != X; then |
2111 PKG_CONFIG="${with_pkg_config_prog}" | 2130 PKG_CONFIG="${with_pkg_config_prog}" |
2112 fi | 2131 fi |
2113 dnl Checks for libraries. | 2132 dnl Checks for libraries. |
2114 PKG_CHECK_MODULES(GTK, $GTK_MODULES) | 2133 PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no) |
2134 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then | |
2135 AC_MSG_ERROR($GTK_PKG_ERRORS) | |
2136 fi | |
2137 fi | |
2138 | |
2139 | |
2140 if test x"$pkg_check_gtk" = xyes; then | |
2141 | |
2115 AC_SUBST(GTK_CFLAGS) | 2142 AC_SUBST(GTK_CFLAGS) |
2116 AC_SUBST(GTK_LIBS) | 2143 AC_SUBST(GTK_LIBS) |
2117 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" | 2144 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" |
2118 CFLAGS="$CFLAGS $GTK_CFLAGS" | 2145 CFLAGS="$CFLAGS $GTK_CFLAGS" |
2119 LIBS="$GTK_LIBS $LIBS" | 2146 LIBS="$GTK_LIBS $LIBS" |
2120 dnl Try to compile a simple GTK program. | 2147 dnl Try to compile a simple GTK program. |
2121 GTK_COMPILES=no | 2148 GTK_COMPILES=no |
2122 AC_CHECK_FUNCS(gtk_main, GTK_COMPILES=yes) | 2149 AC_CHECK_FUNCS(gtk_main, GTK_COMPILES=yes) |
2123 if test "${GTK_COMPILES}" != "yes"; then | 2150 if test "${GTK_COMPILES}" != "yes"; then |
2124 AC_MSG_ERROR([Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?]); | 2151 if test "$USE_X_TOOLKIT" != "maybe"; then |
2125 fi | 2152 AC_MSG_ERROR([Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?]); |
2126 | 2153 fi |
2127 HAVE_GTK=yes | 2154 else |
2128 AC_DEFINE(HAVE_GTK, 1, [Define to 1 if using GTK.]) | 2155 HAVE_GTK=yes |
2129 USE_X_TOOLKIT=none | 2156 AC_DEFINE(HAVE_GTK, 1, [Define to 1 if using GTK.]) |
2157 USE_X_TOOLKIT=none | |
2158 fi | |
2159 | |
2160 fi | |
2161 | |
2162 | |
2163 if test "${HAVE_GTK}" = "yes"; then | |
2130 | 2164 |
2131 dnl GTK scrollbars resemble toolkit scrollbars a lot, so to avoid | 2165 dnl GTK scrollbars resemble toolkit scrollbars a lot, so to avoid |
2132 dnl a lot if #ifdef:s, say we have toolkit scrollbars. | 2166 dnl a lot if #ifdef:s, say we have toolkit scrollbars. |
2133 if test "$with_toolkit_scroll_bars" != no; then | 2167 if test "$with_toolkit_scroll_bars" != no; then |
2134 with_toolkit_scroll_bars=yes | 2168 with_toolkit_scroll_bars=yes |