Mercurial > emacs
comparison configure1.in @ 4361:81016e10e279
* configure.in: If we found X on our own, set C_SWITCH_X_SITE and
LD_SWITCH_X_SITE and assume --with-x11.
Only look for X11 files if we weren't told about a window system
or if we were told to use X11 but not told where.
Search the libraries from the s and/or m files when checking for
functions.
* configure.in: Remove any trailing slashes in prefix and exec_prefix.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 31 Jul 1993 00:55:39 +0000 |
parents | 5b54255ee4b3 |
children | f593b231193f |
comparison
equal
deleted
inserted
replaced
4360:ea004f01b2d8 | 4361:81016e10e279 |
---|---|
201 fi | 201 fi |
202 index=`expr $index + 1` | 202 index=`expr $index + 1` |
203 val=`eval echo '$'$index` | 203 val=`eval echo '$'$index` |
204 fi | 204 fi |
205 x_includes="${val}" | 205 x_includes="${val}" |
206 C_SWITCH_X_SITE="-I\"${x_includes}\"" | |
207 ;; | 206 ;; |
208 "x_libraries" ) | 207 "x_libraries" ) |
209 ## If the value was omitted, get it from the next argument. | 208 ## If the value was omitted, get it from the next argument. |
210 if [ "${valomitted}" = "yes" ]; then | 209 if [ "${valomitted}" = "yes" ]; then |
211 ## Get the next argument from the argument list, if there is one. | 210 ## Get the next argument from the argument list, if there is one. |
217 fi | 216 fi |
218 index=`expr $index + 1` | 217 index=`expr $index + 1` |
219 val=`eval echo '$'$index` | 218 val=`eval echo '$'$index` |
220 fi | 219 fi |
221 x_libraries="${val}" | 220 x_libraries="${val}" |
222 LD_SWITCH_X_SITE="-L\"${x_libraries}\"" | |
223 ;; | 221 ;; |
224 | 222 |
225 ## Should this use the "development configuration"? | 223 ## Should this use the "development configuration"? |
226 "run_in_place" ) | 224 "run_in_place" ) |
227 rip_paths='' | 225 rip_paths='' |
950 dnl checks for header files | 948 dnl checks for header files |
951 AC_HAVE_HEADERS(sys/timeb.h sys/time.h) | 949 AC_HAVE_HEADERS(sys/timeb.h sys/time.h) |
952 AC_STDC_HEADERS | 950 AC_STDC_HEADERS |
953 AC_TIME_WITH_SYS_TIME | 951 AC_TIME_WITH_SYS_TIME |
954 | 952 |
955 dnl checks for library files | |
956 AC_HAVE_LIBRARY(-ldnet) | |
957 | |
958 dnl checks for typedefs | 953 dnl checks for typedefs |
959 AC_RETSIGTYPE | 954 AC_RETSIGTYPE |
960 | |
961 dnl checks for functions | |
962 AC_ALLOCA | |
963 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir) | |
964 ok_so_far=true | |
965 AC_FUNC_CHECK(socket,, ok_so_far=) | |
966 if test -n "$ok_so_far"; then | |
967 AC_HEADER_CHECK(netinet/in.h,, ok_so_far=) | |
968 fi | |
969 if test -n "$ok_so_far"; then | |
970 AC_HEADER_CHECK(arpa/inet.h,, ok_so_far=) | |
971 fi | |
972 if test -n "$ok_so_far"; then | |
973 AC_DEFINE(HAVE_INET_SOCKETS) | |
974 fi | |
975 | 955 |
976 dnl checks for structure members | 956 dnl checks for structure members |
977 AC_STRUCT_TM | 957 AC_STRUCT_TM |
978 AC_TIMEZONE | 958 AC_TIMEZONE |
979 | 959 |
1007 yes ) | 987 yes ) |
1008 window_system=${window_system}x10 | 988 window_system=${window_system}x10 |
1009 ;; | 989 ;; |
1010 esac | 990 esac |
1011 | 991 |
1012 ### If the user hasn't specified where we should find X, try | |
1013 ### letting autoconf figure that out. | |
1014 if [ "0${x_includes}" = 0 ] && [ "0${x_libraries}" = 0 ]; then | |
1015 ] | |
1016 AC_FIND_X | |
1017 [ | |
1018 if [ "0${x_includes}" != 0 ]; then | |
1019 C_SWITCH_X_SITE="-I\"${x_includes}\"" | |
1020 fi | |
1021 if [ "0${x_libraries}" != 0 ]; then | |
1022 LD_SWITCH_X_SITE="-L\"${x_libraries}\"" | |
1023 fi | |
1024 fi | |
1025 | |
1026 case "${window_system}" in | 992 case "${window_system}" in |
1027 "none" | "x11" | "x10" ) ;; | 993 "none" | "x11" | "x10" ) ;; |
1028 "" ) | 994 "" ) |
1029 echo " No window system specified. Looking for X11." | 995 # --x-includes or --x-libraries implies --with-x11. |
1030 window_system=none | 996 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then |
1031 if [ -r /usr/lib/libX11.a \ | 997 window_system=x11 |
998 else | |
999 echo " No window system specified. Looking for X11." | |
1000 # If the user didn't specify a window system and we found X11, use it. | |
1001 if [ -r /usr/lib/libX11.a \ | |
1032 -o -d /usr/include/X11 \ | 1002 -o -d /usr/include/X11 \ |
1033 -o -d /usr/X386/include \ | 1003 -o -d /usr/X386/include \ |
1034 -o -d ${x_includes}/X11 ]; then | 1004 -o -d ${x_includes}/X11 ]; then |
1005 window_system=x11 | |
1006 fi | |
1007 fi | |
1008 ;; | |
1009 * ) | |
1010 echo "Don't specify a window system more than once." >&2 | |
1011 exit 1 | |
1012 ;; | |
1013 esac | |
1014 | |
1015 case "${window_system}" in | |
1016 "" | "x11" ) | |
1017 ### If the user hasn't specified where we should find X, try | |
1018 ### letting autoconf figure that out. | |
1019 if [ -z "${x_includes}" ] && [ -z "${x_libraries}" ]; then | |
1020 ] | |
1021 AC_FIND_X | |
1022 [ | |
1023 fi | |
1024 if [ -n "${x_includes}" ] || [ -n "${x_libraries}" ]; then | |
1035 window_system=x11 | 1025 window_system=x11 |
1036 fi | 1026 fi |
1037 ;; | 1027 ;; |
1038 * ) | |
1039 echo "Don't specify the window system more than once." >&2 | |
1040 exit 1 | |
1041 ;; | |
1042 esac | 1028 esac |
1029 | |
1030 [ -z "${window_system}" ] && window_system=none | |
1031 | |
1032 [ -n "${x_libraries}" ] && LD_SWITCH_X_SITE="-L${x_libraries}" | |
1033 [ -n "${x_includes}" ] && C_SWITCH_X_SITE="-I${x_includes}" | |
1043 | 1034 |
1044 case "${window_system}" in | 1035 case "${window_system}" in |
1045 x11 ) | 1036 x11 ) |
1046 HAVE_X_WINDOWS=yes | 1037 HAVE_X_WINDOWS=yes |
1047 HAVE_X11=yes | 1038 HAVE_X11=yes |
1091 #define C_SWITCH_SYSTEM | 1082 #define C_SWITCH_SYSTEM |
1092 #endif | 1083 #endif |
1093 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM | 1084 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM |
1094 @configure@ c_switch_system=C_SWITCH_SYSTEM | 1085 @configure@ c_switch_system=C_SWITCH_SYSTEM |
1095 | 1086 |
1087 #ifndef LIB_X11_LIB | |
1088 #define LIB_X11_LIB | |
1089 #endif | |
1090 | |
1091 #ifndef LIBX11_MACHINE | |
1092 #define LIBX11_MACHINE | |
1093 #endif | |
1094 | |
1095 #ifndef LIBX11_SYSTEM | |
1096 #define LIBX11_SYSTEM | |
1097 #endif | |
1098 @configure@ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM | |
1099 | |
1096 #ifdef UNEXEC | 1100 #ifdef UNEXEC |
1097 @configure@ unexec=UNEXEC | 1101 @configure@ unexec=UNEXEC |
1098 #else | 1102 #else |
1099 @configure@ unexec=unexec.o | 1103 @configure@ unexec=unexec.o |
1100 #endif | 1104 #endif |
1144 fi | 1148 fi |
1145 | 1149 |
1146 LISP_FLOAT_TYPE=yes | 1150 LISP_FLOAT_TYPE=yes |
1147 | 1151 |
1148 | 1152 |
1149 #### Add the X libraries to the list, and check for some functions found there. | 1153 #### Add the libraries to LIBS and check for some functions. |
1150 CFLAGS_save="$CFLAGS" | 1154 |
1151 CFLAGS="${CFLAGS} ${LD_SWITCH_X_SITE}" | |
1152 ] | 1155 ] |
1153 AC_HAVE_LIBRARY(-lXbsd) | 1156 DEFS="$c_switch_system $DEFS" |
1157 LIBS="$libsrc_libs" | |
1158 | |
1159 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks, | |
1160 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks. | |
1161 AC_HAVE_LIBRARY(-ldnet) | |
1162 | |
1163 AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" | |
1164 if test -d /usr/X386/include; then | |
1165 HAVE_XFREE386=yes | |
1166 test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include" | |
1167 fi) | |
1168 | |
1169 if test "${HAVE_X11}" = "yes"; then | |
1170 DEFS="$C_SWITCH_X_SITE $DEFS" | |
1171 LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS" | |
1172 AC_HAVE_FUNCS(XrmSetDatabase random) | |
1173 fi | |
1174 | |
1175 AC_ALLOCA | |
1176 AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir) | |
1177 | |
1178 ok_so_far=true | |
1179 AC_FUNC_CHECK(socket, , ok_so_far=) | |
1180 if test -n "$ok_so_far"; then | |
1181 AC_HEADER_CHECK(netinet/in.h, , ok_so_far=) | |
1182 fi | |
1183 if test -n "$ok_so_far"; then | |
1184 AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=) | |
1185 fi | |
1186 if test -n "$ok_so_far"; then | |
1187 AC_DEFINE(HAVE_INET_SOCKETS) | |
1188 fi | |
1154 [ | 1189 [ |
1155 LIBS_save="$LIBS" | |
1156 if [ "${HAVE_X11}" = "yes" ] ; then | |
1157 LIBS="-lX11 ${LIBS}" | |
1158 fi | |
1159 ] | |
1160 AC_HAVE_FUNCS(XrmSetDatabase random) | |
1161 [ | |
1162 CFLAGS="$CFLAGS_save" | |
1163 LIBS="$LIBS_save" | |
1164 | |
1165 case "${window_system}:${LIBS}" in | |
1166 x11:*-lXbsd* ) | |
1167 if [ -d /usr/X386/include ]; then | |
1168 HAVE_XFREE386=yes | |
1169 if [ "${C_SWITCH_X_SITE}" = "" ]; then | |
1170 C_SWITCH_X_SITE="-I/usr/X386/include" | |
1171 fi | |
1172 fi | |
1173 ;; | |
1174 esac | |
1175 | |
1176 #### Find out which version of Emacs this is. | 1190 #### Find out which version of Emacs this is. |
1177 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ | 1191 version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ |
1178 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'` | 1192 | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1/'` |
1179 if [ x"${version}" = x ]; then | 1193 if [ x"${version}" = x ]; then |
1180 echo "${progname}: can't find current emacs version in | 1194 echo "${progname}: can't find current emacs version in |
1243 What window system should Emacs use? ${window_system}${x_includes+ | 1257 What window system should Emacs use? ${window_system}${x_includes+ |
1244 Where do we find X Windows header files? }${x_includes}${x_libraries+ | 1258 Where do we find X Windows header files? }${x_includes}${x_libraries+ |
1245 Where do we find X Windows libraries? }${x_libraries} | 1259 Where do we find X Windows libraries? }${x_libraries} |
1246 | 1260 |
1247 " | 1261 " |
1262 | |
1263 # Remove any trailing slashes in these variables. | |
1264 test -n "${prefix}" && | |
1265 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
1266 test -n "${exec_prefix}" && | |
1267 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` | |
1248 ] | 1268 ] |
1249 AC_OUTPUT(Makefile) | 1269 AC_OUTPUT(Makefile) |