X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/d4840f44f76157dac920967177aca0791f95a10c..32a8a3cff58c29c95660d97c293a4810b16f5a34:/configure.in diff --git a/configure.in b/configure.in index 3686753e8c..930129bfda 100644 --- a/configure.in +++ b/configure.in @@ -2118,24 +2118,6 @@ fail; fi fi -if test "${window_system}" = "x11"; then - AC_MSG_CHECKING(X11 version 5) - AC_CACHE_VAL(emacs_cv_x11_version_5, - [AC_TRY_LINK([#include ], -[#if XlibSpecificationRelease < 5 -fail; -#endif -], emacs_cv_x11_version_5=yes, emacs_cv_x11_version_5=no)]) - if test $emacs_cv_x11_version_5 = yes; then - AC_MSG_RESULT(5 or newer) - HAVE_X11R5=yes - AC_DEFINE(HAVE_X11R5, 1, - [Define to 1 if you have the X11R5 or newer version of Xlib.]) - else - HAVE_X11R5=no - AC_MSG_RESULT(before 5) - fi -fi ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. HAVE_RSVG=no @@ -2253,7 +2235,10 @@ if test "${HAVE_GTK}" = "yes"; then AC_CHECK_LIB(pthread, pthread_self, HAVE_GTK_AND_PTHREAD=yes) fi if test "$HAVE_GTK_AND_PTHREAD" = yes; then - GTK_LIBS="$GTK_LIBS -lpthread" + case "${canonical}" in + *-hpux*) ;; + *) GTK_LIBS="$GTK_LIBS -lpthread" ;; + esac AC_DEFINE(HAVE_GTK_AND_PTHREAD, 1, [Define to 1 if you have GTK and pthread (-lpthread).]) fi @@ -2295,46 +2280,42 @@ dnl Do not put whitespace before the #include statements below. dnl Older compilers (eg sunos4 cc) choke on it. HAVE_XAW3D=no if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then - if test x"${HAVE_X11R5}" != xyes; then - USE_X_TOOLKIT=none - else - if test "$with_xaw3d" != no; then - AC_MSG_CHECKING(for xaw3d) - AC_CACHE_VAL(emacs_cv_xaw3d, - [AC_TRY_LINK([ + if test "$with_xaw3d" != no; then + AC_MSG_CHECKING(for xaw3d) + AC_CACHE_VAL(emacs_cv_xaw3d, + [AC_TRY_LINK([ #include #include ], - [], - emacs_cv_xaw3d=yes, - emacs_cv_xaw3d=no)]) - else - emacs_cv_xaw3d=no - fi - if test $emacs_cv_xaw3d = yes; then + [], + emacs_cv_xaw3d=yes, + emacs_cv_xaw3d=no)]) + else + emacs_cv_xaw3d=no + fi + if test $emacs_cv_xaw3d = yes; then + AC_MSG_RESULT([yes; using Lucid toolkit]) + USE_X_TOOLKIT=LUCID + HAVE_XAW3D=yes + AC_DEFINE(HAVE_XAW3D, 1, + [Define to 1 if you have the Xaw3d library (-lXaw3d).]) + else + AC_MSG_RESULT(no) + AC_MSG_CHECKING(for libXaw) + AC_CACHE_VAL(emacs_cv_xaw, + [AC_TRY_LINK([ +#include +#include ], + [], + emacs_cv_xaw=yes, + emacs_cv_xaw=no)]) + if test $emacs_cv_xaw = yes; then AC_MSG_RESULT([yes; using Lucid toolkit]) USE_X_TOOLKIT=LUCID - HAVE_XAW3D=yes - AC_DEFINE(HAVE_XAW3D, 1, - [Define to 1 if you have the Xaw3d library (-lXaw3d).]) + elif test x"${USE_X_TOOLKIT}" = xLUCID; then + AC_MSG_ERROR([Lucid toolkit requires X11/Xaw include files]) else - AC_MSG_RESULT(no) - AC_MSG_CHECKING(for libXaw) - AC_CACHE_VAL(emacs_cv_xaw, - [AC_TRY_LINK([ -#include -#include ], - [], - emacs_cv_xaw=yes, - emacs_cv_xaw=no)]) - if test $emacs_cv_xaw = yes; then - AC_MSG_RESULT([yes; using Lucid toolkit]) - USE_X_TOOLKIT=LUCID - elif test x"${USE_X_TOOLKIT}" = xLUCID; then - AC_MSG_ERROR([Lucid toolkit requires X11/Xaw include files]) - else - AC_MSG_RESULT([no; do not use toolkit by default]) - USE_X_TOOLKIT=none - fi + AC_MSG_RESULT([no; do not use toolkit by default]) + USE_X_TOOLKIT=none fi fi fi @@ -2728,7 +2709,7 @@ AC_CHECK_HEADERS(maillock.h) AC_CHECK_FUNCS(gethostname getdomainname dup2 \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ -random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \ +random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \ strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ @@ -2772,17 +2753,42 @@ AC_CHECK_FUNCS(getpt) # than to expect to find it in ncurses. AC_CHECK_LIB(ncurses, tparm) +# Do we have res_init, for detecting changes in /etc/resolv.conf? + +resolv=no +AC_TRY_LINK([#include +#include +#include ], + [return res_init();], + have_res_init=yes, have_res_init=no) +if test "$have_res_init" = no; then + OLIBS="$LIBS" + LIBS="$LIBS -lresolv" + AC_MSG_CHECKING(for res_init with -lresolv) + AC_TRY_LINK([#include +#include +#include ], + [return res_init();], + have_res_init=yes, have_res_init=no) + AC_MSG_RESULT($have_res_init) + if test "$have_res_init" = yes ; then + resolv=yes + fi + LIBS="$OLIBS" +fi + +if test "$have_res_init" = yes; then + AC_DEFINE(HAVE_RES_INIT, 1, [Define to 1 if res_init is available.]) +fi + # Do we need the Hesiod library to provide the support routines? if test "$with_hesiod" = yes ; then # Don't set $LIBS here -- see comments above. - resolv=no AC_CHECK_FUNC(res_send, , [AC_CHECK_FUNC(__res_send, , [AC_CHECK_LIB(resolv, res_send, resolv=yes, [AC_CHECK_LIB(resolv, __res_send, resolv=yes)])])]) if test "$resolv" = yes ; then RESOLVLIB=-lresolv - AC_DEFINE(HAVE_LIBRESOLV, 1, - [Define to 1 if you have the resolv library (-lresolv).]) else RESOLVLIB= fi @@ -2792,6 +2798,12 @@ if test "$with_hesiod" = yes ; then :, $RESOLVLIB)]) fi +# Do we need libresolv (due to res_init or Hesiod)? +if test "$resolv" = yes ; then + AC_DEFINE(HAVE_LIBRESOLV, 1, + [Define to 1 if you have the resolv library (-lresolv).]) +fi + # These tell us which Kerberos-related libraries to use. if test "${with_kerberos+set}" = set; then AC_CHECK_LIB(com_err, com_err) @@ -3329,7 +3341,7 @@ typedef unsigned size_t; #ifdef HAVE_X11R6 #define HAVE_X_I18N -#elif defined HAVE_X11R5 && !defined X11R5_INHIBIT_I18N +#elif !defined X11R5_INHIBIT_I18N #define HAVE_X_I18N #endif @@ -3444,6 +3456,14 @@ if test "$USE_X_TOOLKIT" = GTK; then fi +if test "$HAVE_CARBON" = "yes"; then + echo + echo "Warning: The Mac Carbon port is currently unsupported and has +known problems. It is not recommended for use by non-developers. +Read the emacs-devel archives for more information." + echo +fi + # Remove any trailing slashes in these variables. [test "${prefix}" != NONE &&