diff options
| -rwxr-xr-x | configure1.in | 144 |
1 files changed, 82 insertions, 62 deletions
diff --git a/configure1.in b/configure1.in index a0ebe41aa9a..d87414a8485 100755 --- a/configure1.in +++ b/configure1.in | |||
| @@ -203,7 +203,6 @@ Set it to either \`yes' or \`no'." | |||
| 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. |
| @@ -219,7 +218,6 @@ Set it to either \`yes' or \`no'." | |||
| 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"? |
| @@ -952,27 +950,9 @@ 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 | 955 | ||
| 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 | |||
| 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 |
| @@ -1009,39 +989,50 @@ case "${with_x10}" in | |||
| 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 |
| 1035 | window_system=x11 | 1005 | window_system=x11 |
| 1006 | fi | ||
| 1036 | fi | 1007 | fi |
| 1037 | ;; | 1008 | ;; |
| 1038 | * ) | 1009 | * ) |
| 1039 | echo "Don't specify the window system more than once." >&2 | 1010 | echo "Don't specify a window system more than once." >&2 |
| 1040 | exit 1 | 1011 | exit 1 |
| 1041 | ;; | 1012 | ;; |
| 1042 | esac | 1013 | esac |
| 1043 | 1014 | ||
| 1044 | case "${window_system}" in | 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 | ||
| 1025 | window_system=x11 | ||
| 1026 | fi | ||
| 1027 | ;; | ||
| 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}" | ||
| 1034 | |||
| 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 |
| @@ -1093,6 +1084,19 @@ echo ' | |||
| 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 |
| @@ -1146,33 +1150,43 @@ fi | |||
| 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 | ] | ||
| 1153 | AC_HAVE_LIBRARY(-lXbsd) | ||
| 1154 | [ | ||
| 1155 | LIBS_save="$LIBS" | ||
| 1156 | if [ "${HAVE_X11}" = "yes" ] ; then | ||
| 1157 | LIBS="-lX11 ${LIBS}" | ||
| 1158 | fi | ||
| 1159 | ] | 1155 | ] |
| 1160 | AC_HAVE_FUNCS(XrmSetDatabase random) | 1156 | DEFS="$c_switch_system $DEFS" |
| 1161 | [ | 1157 | LIBS="$libsrc_libs" |
| 1162 | CFLAGS="$CFLAGS_save" | 1158 | |
| 1163 | LIBS="$LIBS_save" | 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) | ||
| 1164 | 1162 | ||
| 1165 | case "${window_system}:${LIBS}" in | 1163 | AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" |
| 1166 | x11:*-lXbsd* ) | 1164 | if test -d /usr/X386/include; then |
| 1167 | if [ -d /usr/X386/include ]; then | ||
| 1168 | HAVE_XFREE386=yes | 1165 | HAVE_XFREE386=yes |
| 1169 | if [ "${C_SWITCH_X_SITE}" = "" ]; then | 1166 | test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include" |
| 1170 | C_SWITCH_X_SITE="-I/usr/X386/include" | 1167 | fi) |
| 1171 | fi | ||
| 1172 | fi | ||
| 1173 | ;; | ||
| 1174 | esac | ||
| 1175 | 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 | ||
| 1189 | [ | ||
| 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/'` |
| @@ -1245,5 +1259,11 @@ Configured for \`${canonical}'. | |||
| 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) |