aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure1.in144
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)
952AC_STDC_HEADERS 950AC_STDC_HEADERS
953AC_TIME_WITH_SYS_TIME 951AC_TIME_WITH_SYS_TIME
954 952
955dnl checks for library files
956AC_HAVE_LIBRARY(-ldnet)
957
958dnl checks for typedefs 953dnl checks for typedefs
959AC_RETSIGTYPE 954AC_RETSIGTYPE
960 955
961dnl checks for functions
962AC_ALLOCA
963AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir)
964ok_so_far=true
965AC_FUNC_CHECK(socket,, ok_so_far=)
966if test -n "$ok_so_far"; then
967 AC_HEADER_CHECK(netinet/in.h,, ok_so_far=)
968fi
969if test -n "$ok_so_far"; then
970 AC_HEADER_CHECK(arpa/inet.h,, ok_so_far=)
971fi
972if test -n "$ok_so_far"; then
973 AC_DEFINE(HAVE_INET_SOCKETS)
974fi
975
976dnl checks for structure members 956dnl checks for structure members
977AC_STRUCT_TM 957AC_STRUCT_TM
978AC_TIMEZONE 958AC_TIMEZONE
@@ -1009,39 +989,50 @@ case "${with_x10}" in
1009 ;; 989 ;;
1010esac 990esac
1011 991
1012### If the user hasn't specified where we should find X, try
1013### letting autoconf figure that out.
1014if [ "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
1024fi
1025
1026case "${window_system}" in 992case "${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 ;;
1042esac 1013esac
1043 1014
1044case "${window_system}" in 1015case "${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 ;;
1028esac
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
1035case "${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
1146LISP_FLOAT_TYPE=yes 1150LISP_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.
1150CFLAGS_save="$CFLAGS" 1154
1151CFLAGS="${CFLAGS} ${LD_SWITCH_X_SITE}"
1152]
1153AC_HAVE_LIBRARY(-lXbsd)
1154[
1155LIBS_save="$LIBS"
1156if [ "${HAVE_X11}" = "yes" ] ; then
1157 LIBS="-lX11 ${LIBS}"
1158fi
1159] 1155]
1160AC_HAVE_FUNCS(XrmSetDatabase random) 1156DEFS="$c_switch_system $DEFS"
1161[ 1157LIBS="$libsrc_libs"
1162CFLAGS="$CFLAGS_save" 1158
1163LIBS="$LIBS_save" 1159dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks,
1160dnl and also adds -ldnet to LIBS, which Autoconf uses for checks.
1161AC_HAVE_LIBRARY(-ldnet)
1164 1162
1165case "${window_system}:${LIBS}" in 1163AC_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 ;;
1174esac
1175 1168
1169if 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)
1173fi
1174
1175AC_ALLOCA
1176AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir)
1177
1178ok_so_far=true
1179AC_FUNC_CHECK(socket, , ok_so_far=)
1180if test -n "$ok_so_far"; then
1181 AC_HEADER_CHECK(netinet/in.h, , ok_so_far=)
1182fi
1183if test -n "$ok_so_far"; then
1184 AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=)
1185fi
1186if test -n "$ok_so_far"; then
1187 AC_DEFINE(HAVE_INET_SOCKETS)
1188fi
1189[
1176#### Find out which version of Emacs this is. 1190#### Find out which version of Emacs this is.
1177version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ 1191version=`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.
1264test -n "${prefix}" &&
1265 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
1266test -n "${exec_prefix}" &&
1267 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
1248] 1268]
1249AC_OUTPUT(Makefile) 1269AC_OUTPUT(Makefile)