comparison configure1.in @ 5641:e3854e6846a0

Handle --with-x-toolkit. Produce lwlib/Makefile. Substitute USE_X_TOOLKIT as both C macro and Make variable. If CPP has a value that is a directory, discard the value.
author Richard M. Stallman <rms@gnu.org>
date Thu, 20 Jan 1994 14:39:31 +0000
parents b4cec0550c73
children 98f1c53b0ce6
comparison
equal deleted inserted replaced
5640:f0f285e628d0 5641:e3854e6846a0
79 etcdir='${datadir}/emacs/${version}/etc' 79 etcdir='${datadir}/emacs/${version}/etc'
80 lockdir='${statedir}/emacs/lock' 80 lockdir='${statedir}/emacs/lock'
81 archlibdir='${libdir}/emacs/${version}/${configuration}' 81 archlibdir='${libdir}/emacs/${version}/${configuration}'
82 CC= 82 CC=
83 83
84 # On Sun systems, people sometimes set up the variable CPP
85 # with a value that is a directory, not an executable at all.
86 # Detect that case, and ignore that value.
87 if [ "x$CPP" != x ] && [ -d "$CPP" ];
88 then
89 CPP=
90 fi
91
84 # We cannot use this variable in the case statement below, because many 92 # We cannot use this variable in the case statement below, because many
85 # /bin/sh's have broken semantics for "case". Unfortunately, you must 93 # /bin/sh's have broken semantics for "case". Unfortunately, you must
86 # actually edit the clause itself. 94 # actually edit the clause itself.
87 # path_options="prefix | exec_prefix | bindir | libdir | etcdir | datadir" 95 # path_options="prefix | exec_prefix | bindir | libdir | etcdir | datadir"
88 # path_options="$path_options | archlibdir | statedir | mandir | infodir" 96 # path_options="$path_options | archlibdir | statedir | mandir | infodir"
94 102
95 Set compilation and installation parameters for GNU Emacs, and report. 103 Set compilation and installation parameters for GNU Emacs, and report.
96 CONFIGURATION specifies the machine and operating system to build for. 104 CONFIGURATION specifies the machine and operating system to build for.
97 --with-x Support the X Window System. 105 --with-x Support the X Window System.
98 --with-x=no Don't support X. 106 --with-x=no Don't support X.
107 --with-x-toolkit Use an X toolkit.
108 --with-x-toolkit=no Don't use an X toolkit.
109 --with-gcc Use GCC to compile Emacs.
110 --with-gcc=no Don't use GCC to compile Emacs.
99 --x-includes=DIR Search for X header files in DIR. 111 --x-includes=DIR Search for X header files in DIR.
100 --x-libraries=DIR Search for X libraries in DIR. 112 --x-libraries=DIR Search for X libraries in DIR.
101 --with-gcc Use GCC to compile Emacs.
102 --with-gcc=no Don't use GCC to compile Emacs.
103 --run-in-place Use libraries and data files directly out of the 113 --run-in-place Use libraries and data files directly out of the
104 source tree. 114 source tree.
105 --single-tree=DIR Has the effect of creating a directory tree at DIR 115 --single-tree=DIR Has the effect of creating a directory tree at DIR
106 which looks like: 116 which looks like:
107 .../DIR/bin/CONFIGNAME (emacs, etags, etc.) 117 .../DIR/bin/CONFIGNAME (emacs, etags, etc.)
177 y | ye | yes ) val=yes ;; 187 y | ye | yes ) val=yes ;;
178 n | no ) val=no ;; 188 n | no ) val=no ;;
179 * ) 189 * )
180 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value. 190 (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value.
181 Set it to either \`yes' or \`no'." 191 Set it to either \`yes' or \`no'."
192 echo "${short_usage}") >&2
193 exit 1
194 ;;
195 esac
196 eval "${opt}=\"${val}\""
197 ;;
198
199 ## Has the user specified which toolkit they want to support?
200 "with_x_toolkit" )
201 ## Make sure the value given was either "yes" or "no".
202 case "${val}" in
203 y | ye | yes ) val=athena ;;
204 n | no ) val=no ;;
205 l | lu | luc | luci | lucid ) val=lucid ;;
206 a | at | ath | athe | athena ) val=athena ;;
207 m | mo | mot | moti | motif ) val=motif ;;
208 o | op | ope | open | open- | open-l | open-lo \
209 | open-loo | open-look ) val=open-look ;;
210 * )
211 (echo "${progname}: the \`--${optname}' option is supposed to have a value
212 which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'."
182 echo "${short_usage}") >&2 213 echo "${short_usage}") >&2
183 exit 1 214 exit 1
184 ;; 215 ;;
185 esac 216 esac
186 eval "${opt}=\"${val}\"" 217 eval "${opt}=\"${val}\""
405 vpath %.s $(srcdir)\ 436 vpath %.s $(srcdir)\
406 vpath %.in $(srcdir)' 437 vpath %.in $(srcdir)'
407 fi 438 fi
408 439
409 ### Make the necessary directories, if they don't exist. 440 ### Make the necessary directories, if they don't exist.
410 for dir in ./src ./lib-src ./cpp ./oldXMenu ./etc ; do 441 for dir in ./src ./lib-src ./cpp ./oldXMenu ./lwlib ./etc ; do
411 if [ ! -d ${dir} ]; then 442 if [ ! -d ${dir} ]; then
412 mkdir ${dir} 443 mkdir ${dir}
413 fi 444 fi
414 done 445 done
415 446
1115 echo "Don't specify a window system more than once." >&2 1146 echo "Don't specify a window system more than once." >&2
1116 exit 1 1147 exit 1
1117 ;; 1148 ;;
1118 esac 1149 esac
1119 1150
1120 case "${window_system}" in
1121 "" | "x11" )
1122 ### If the user hasn't specified where we should find X, try
1123 ### letting autoconf figure that out.
1124 if [ -z "${x_includes}" ] && [ -z "${x_libraries}" ]; then
1125 ]
1126 AC_FIND_X
1127 [
1128 fi
1129 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then
1130 window_system=x11
1131 fi
1132 ;;
1133 esac
1134
1135 [ -z "${window_system}" ] && window_system=none 1151 [ -z "${window_system}" ] && window_system=none
1136 1152
1137 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}" 1153 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}"
1138 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE_AUX="-R${x_libraries}" 1154 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE_AUX="-R${x_libraries}"
1139 [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}" 1155 [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}"
1146 case "${window_system}" in 1162 case "${window_system}" in
1147 x11 ) 1163 x11 )
1148 HAVE_X_WINDOWS=yes 1164 HAVE_X_WINDOWS=yes
1149 HAVE_X11=yes 1165 HAVE_X11=yes
1150 echo " Using X11." 1166 echo " Using X11."
1167 case "${with_x_toolkit}" in
1168 athena )
1169 USE_X_TOOLKIT=ATHENA
1170 echo " Using Xt toolkit."
1171 ;;
1172 lucid )
1173 USE_X_TOOLKIT=LUCID
1174 echo " Using Lucid toolkit."
1175 ;;
1176 motif )
1177 USE_X_TOOLKIT=MOTIF
1178 echo " Using Motif toolkit."
1179 ;;
1180 open-look )
1181 USE_X_TOOLKIT=OPEN_LOOK
1182 echo " Using Open-Look toolkit."
1183 ;;
1184 * )
1185 USE_X_TOOLKIT=no
1186 echo " Using Xlib directly."
1187 ;;
1188 esac
1151 ;; 1189 ;;
1152 x10 ) 1190 x10 )
1153 HAVE_X_WINDOWS=yes 1191 HAVE_X_WINDOWS=yes
1154 HAVE_X11=no 1192 HAVE_X11=no
1193 USE_X_TOOLKIT=no
1155 echo " Using X10." 1194 echo " Using X10."
1156 ;; 1195 ;;
1157 none ) 1196 none )
1158 HAVE_X_WINDOWS=no 1197 HAVE_X_WINDOWS=no
1159 HAVE_X11=no 1198 HAVE_X11=no
1160 echo " Using no window system." 1199 echo " Using no window system."
1161 ;; 1200 ;;
1162 esac 1201 esac
1202 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
1163 1203
1164 ### If we're using X11, we should use the X menu package. 1204 ### If we're using X11, we should use the X menu package.
1165 HAVE_X_MENU=no 1205 HAVE_X_MENU=no
1166 case ${HAVE_X11} in 1206 case ${HAVE_X11} in
1167 yes ) 1207 yes )
1344 AC_SUBST(libsrc_libs) 1384 AC_SUBST(libsrc_libs)
1345 AC_SUBST(LD_SWITCH_X_SITE) 1385 AC_SUBST(LD_SWITCH_X_SITE)
1346 AC_SUBST(LD_SWITCH_X_SITE_AUX) 1386 AC_SUBST(LD_SWITCH_X_SITE_AUX)
1347 AC_SUBST(C_SWITCH_X_SITE) 1387 AC_SUBST(C_SWITCH_X_SITE)
1348 AC_SUBST(CFLAGS) 1388 AC_SUBST(CFLAGS)
1389 AC_SUBST(X_TOOLKIT_TYPE)
1349 1390
1350 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"") 1391 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"")
1351 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"") 1392 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"")
1352 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE}) 1393 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
1353 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE_AUX}) 1394 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE_AUX})
1355 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC}) 1396 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC})
1356 1397
1357 [ 1398 [
1358 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then 1399 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
1359 ] AC_DEFINE(HAVE_X_WINDOWS) [ 1400 ] AC_DEFINE(HAVE_X_WINDOWS) [
1401 fi
1402 if [ "${USE_X_TOOLKIT}" = "yes" ] ; then
1403 ] AC_DEFINE(USE_X_TOOLKIT) [
1360 fi 1404 fi
1361 if [ "${HAVE_X11}" = "yes" ] ; then 1405 if [ "${HAVE_X11}" = "yes" ] ; then
1362 ] AC_DEFINE(HAVE_X11) [ 1406 ] AC_DEFINE(HAVE_X11) [
1363 fi 1407 fi
1364 if [ "${HAVE_XFREE386}" = "yes" ] ; then 1408 if [ "${HAVE_XFREE386}" = "yes" ] ; then
1446 test -n "${prefix}" && 1490 test -n "${prefix}" &&
1447 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` 1491 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
1448 test -n "${exec_prefix}" && 1492 test -n "${exec_prefix}" &&
1449 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` 1493 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
1450 ] 1494 ]
1451 AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in, [ 1495 AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile lwlib/Makefile src/Makefile.in, [
1452 # Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done 1496 # Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done
1453 # after src/config.h is built, since we rely on that file. 1497 # after src/config.h is built, since we rely on that file.
1454 1498
1455 changequote(,)dnl The horror, the horror. 1499 changequote(,)dnl The horror, the horror.
1456 # Now get this: Some word that is part of the ${srcdir} directory name 1500 # Now get this: Some word that is part of the ${srcdir} directory name