aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-03-17 22:49:31 -0700
committerGlenn Morris2010-03-17 22:49:31 -0700
commitaded53ff76daa41822954fc42df797b1e0c5a5f4 (patch)
treeb87f8469b983d27d79478edfd478e4ec62993ab0
parent1a355d092be234a0cb5b2cf0956a090aad7fa1a2 (diff)
downloademacs-aded53ff76daa41822954fc42df797b1e0c5a5f4.tar.gz
emacs-aded53ff76daa41822954fc42df797b1e0c5a5f4.zip
Replace some cpp with autoconf.
* configure.in (--with-mmdf, --with-mail-unlink): New options, off by default. (--with-mailhost): New option to set default POP host. (LIBXPM, LIBJPEG, LIBPNG, LIBTIFF, LIBGIF, LIBGPM, LIBS_MAIL) (LIBHESIOD, LIBRESOLV, COM_ERRLIB, CRYPTOLIB, KRB5LIB, DESLIB, KRB4LIB): New variables, substituted in Makefiles. (try_libungif, ac_gif_lib_name): Replace with HAVE_GIF=maybe, LIBGIF. (LIBGIF): Use AC_SUBST rather than AC_DEFINE. (HAVE_LIBMAIL, HAVE_LIBLOCKFILE, HAVE_LIBCOM_ERR, HAVE_LIBCRYPTO) (HAVE_LIBK5CRYPTO, HAVE_LIBKRB5, HAVE_LIBDES425, HAVE_LIBDES) (HAVE_LIBKRB4, HAVE_LIBKRB): New AC_DEFINEs. * lib-src/Makefile.in (KRB4LIB, DESLIB, KRB5LIB, CRYPTOLIB, COM_ERRLIB) (HESIODLIB, LIBS_MAIL): Set using autoconf rather than cpp. (BASE_CFLAGS): Remove (identical to CPP_CFLAGS). * src/Makefile.in (XFT_LIBS, LIBXPM, LIBJPEG, LIBPNG, LIBTIFF, LIBGIF) (LIBGPM, LIBRESOLV): Set using autoconf rather than cpp.
-rw-r--r--ChangeLog14
-rw-r--r--configure.in170
-rw-r--r--etc/NEWS6
-rw-r--r--lib-src/ChangeLog6
-rw-r--r--lib-src/Makefile.in86
-rw-r--r--src/ChangeLog5
-rw-r--r--src/Makefile.in64
7 files changed, 185 insertions, 166 deletions
diff --git a/ChangeLog b/ChangeLog
index a2ce0f1ad03..0c9a34fb332 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
12010-03-18 Glenn Morris <rgm@gnu.org>
2
3 * configure.in (--with-mmdf, --with-mail-unlink):
4 New options, off by default.
5 (--with-mailhost): New option to set default POP host.
6 (LIBXPM, LIBJPEG, LIBPNG, LIBTIFF, LIBGIF, LIBGPM, LIBS_MAIL)
7 (LIBHESIOD, LIBRESOLV, COM_ERRLIB, CRYPTOLIB, KRB5LIB, DESLIB, KRB4LIB):
8 New variables, substituted in Makefiles.
9 (try_libungif, ac_gif_lib_name): Replace with HAVE_GIF=maybe, LIBGIF.
10 (LIBGIF): Use AC_SUBST rather than AC_DEFINE.
11 (HAVE_LIBMAIL, HAVE_LIBLOCKFILE, HAVE_LIBCOM_ERR, HAVE_LIBCRYPTO)
12 (HAVE_LIBK5CRYPTO, HAVE_LIBKRB5, HAVE_LIBDES425, HAVE_LIBDES)
13 (HAVE_LIBKRB4, HAVE_LIBKRB): New AC_DEFINEs.
14
12010-03-18 Tetsurou Okazaki <okazaki@be.to> (tiny change) 152010-03-18 Tetsurou Okazaki <okazaki@be.to> (tiny change)
2 16
3 * Makefile.in (uninstall): Handle the case where archlibdir does not 17 * Makefile.in (uninstall): Handle the case where archlibdir does not
diff --git a/configure.in b/configure.in
index 1b43201f13b..f58a189c4f6 100644
--- a/configure.in
+++ b/configure.in
@@ -91,10 +91,26 @@ if test "${with_kerberos5}" != no; then
91fi 91fi
92 92
93OPTION_DEFAULT_OFF([hesiod],[support Hesiod to get the POP server host]) 93OPTION_DEFAULT_OFF([hesiod],[support Hesiod to get the POP server host])
94dnl FIXME hesiod support may not be present, so it seems like an error
95dnl to define, or at least use, this unconditionally.
94if test "$with_hesiod" != no; then 96if test "$with_hesiod" != no; then
95 AC_DEFINE(HESIOD, 1, [Define to support using a Hesiod database to find the POP server.]) 97 AC_DEFINE(HESIOD, 1, [Define to support using a Hesiod database to find the POP server.])
96fi 98fi
97 99
100OPTION_DEFAULT_OFF([mmdf],[support MMDF mailboxes])
101if test "$with_mmdf" != no; then
102 AC_DEFINE(MAIL_USE_MMDF, 1, [Define to support MMDF mailboxes in movemail.])
103fi
104
105OPTION_DEFAULT_OFF([mail-unlink],[unlink, rather than empty, mail spool after reading])
106if test "$with_mail_unlink" != no; then
107 AC_DEFINE(MAIL_UNLINK_SPOOL, 1, [Define to unlink, rather than empty, mail spool after reading.])
108fi
109
110AC_ARG_WITH([mailhost],[AS_HELP_STRING([--with-mailhost=HOSTNAME],
111 [string giving default POP mail host])],
112 AC_DEFINE_UNQUOTED(MAILHOST, ["$withval"], [String giving fallback POP mail host.]))
113
98OPTION_DEFAULT_ON([sound],[don't compile with sound support]) 114OPTION_DEFAULT_ON([sound],[don't compile with sound support])
99 115
100OPTION_DEFAULT_ON([sync-input],[process async input synchronously]) 116OPTION_DEFAULT_ON([sync-input],[process async input synchronously])
@@ -2078,6 +2094,7 @@ AC_SUBST(M17N_FLT_LIBS)
2078 2094
2079### Use -lXpm if available, unless `--with-xpm=no'. 2095### Use -lXpm if available, unless `--with-xpm=no'.
2080HAVE_XPM=no 2096HAVE_XPM=no
2097LIBXPM=
2081if test "${HAVE_X11}" = "yes"; then 2098if test "${HAVE_X11}" = "yes"; then
2082 if test "${with_xpm}" != "no"; then 2099 if test "${with_xpm}" != "no"; then
2083 AC_CHECK_HEADER(X11/xpm.h, 2100 AC_CHECK_HEADER(X11/xpm.h,
@@ -2101,11 +2118,14 @@ no_return_alloc_pixels
2101 2118
2102 if test "${HAVE_XPM}" = "yes"; then 2119 if test "${HAVE_XPM}" = "yes"; then
2103 AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm libary (-lXpm).]) 2120 AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm libary (-lXpm).])
2121 LIBXPM=-lXpm
2104 fi 2122 fi
2105fi 2123fi
2124AC_SUBST(LIBXPM)
2106 2125
2107### Use -ljpeg if available, unless `--with-jpeg=no'. 2126### Use -ljpeg if available, unless `--with-jpeg=no'.
2108HAVE_JPEG=no 2127HAVE_JPEG=no
2128LIBJPEG=
2109if test "${HAVE_X11}" = "yes"; then 2129if test "${HAVE_X11}" = "yes"; then
2110 if test "${with_jpeg}" != "no"; then 2130 if test "${with_jpeg}" != "no"; then
2111 dnl Checking for jpeglib.h can lose because of a redefinition of 2131 dnl Checking for jpeglib.h can lose because of a redefinition of
@@ -2125,10 +2145,15 @@ if test "${HAVE_X11}" = "yes"; then
2125 [AC_MSG_WARN([libjpeg found, but not version 6b or later]) 2145 [AC_MSG_WARN([libjpeg found, but not version 6b or later])
2126 HAVE_JPEG=no]) 2146 HAVE_JPEG=no])
2127 fi 2147 fi
2148 if test "${HAVE_JPEG}" = "yes"; then
2149 LIBJPEG=-ljpeg
2150 fi
2128fi 2151fi
2152AC_SUBST(LIBJPEG)
2129 2153
2130### Use -lpng if available, unless `--with-png=no'. 2154### Use -lpng if available, unless `--with-png=no'.
2131HAVE_PNG=no 2155HAVE_PNG=no
2156LIBPNG=
2132if test "${HAVE_X11}" = "yes"; then 2157if test "${HAVE_X11}" = "yes"; then
2133 if test "${with_png}" != "no"; then 2158 if test "${with_png}" != "no"; then
2134 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h 2159 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
@@ -2141,11 +2166,14 @@ if test "${HAVE_X11}" = "yes"; then
2141 2166
2142 if test "${HAVE_PNG}" = "yes"; then 2167 if test "${HAVE_PNG}" = "yes"; then
2143 AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).]) 2168 AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
2169 LIBPNG="-lpng -lz -lm"
2144 fi 2170 fi
2145fi 2171fi
2172AC_SUBST(LIBPNG)
2146 2173
2147### Use -ltiff if available, unless `--with-tiff=no'. 2174### Use -ltiff if available, unless `--with-tiff=no'.
2148HAVE_TIFF=no 2175HAVE_TIFF=no
2176LIBTIFF=
2149if test "${HAVE_X11}" = "yes"; then 2177if test "${HAVE_X11}" = "yes"; then
2150 if test "${with_tiff}" != "no"; then 2178 if test "${with_tiff}" != "no"; then
2151 AC_CHECK_HEADER(tiffio.h, 2179 AC_CHECK_HEADER(tiffio.h,
@@ -2157,35 +2185,34 @@ if test "${HAVE_X11}" = "yes"; then
2157 2185
2158 if test "${HAVE_TIFF}" = "yes"; then 2186 if test "${HAVE_TIFF}" = "yes"; then
2159 AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).]) 2187 AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).])
2188 dnl FIXME -lz -lm, as per libpng?
2189 LIBTIFF=-ltiff
2160 fi 2190 fi
2161fi 2191fi
2192AC_SUBST(LIBTIFF)
2162 2193
2163### Use -lgif or -lungif if available, unless `--with-gif=no'. 2194### Use -lgif or -lungif if available, unless `--with-gif=no'.
2164HAVE_GIF=no 2195HAVE_GIF=no
2196LIBGIF=
2165if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then 2197if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
2166 AC_CHECK_HEADER(gif_lib.h, 2198 AC_CHECK_HEADER(gif_lib.h,
2167# EGifPutExtensionLast only exists from version libungif-4.1.0b1. 2199# EGifPutExtensionLast only exists from version libungif-4.1.0b1.
2168# Earlier versions can crash Emacs. 2200# Earlier versions can crash Emacs.
2169 [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, try_libungif=yes)]) 2201 [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, HAVE_GIF=maybe)])
2170 2202
2171 if test "$HAVE_GIF" = yes; then 2203 if test "$HAVE_GIF" = yes; then
2172 ac_gif_lib_name="-lgif" 2204 LIBGIF=-lgif
2173 fi 2205 elif test "$HAVE_GIF" = maybe; then
2174
2175# If gif_lib.h but no libgif, try libungif. 2206# If gif_lib.h but no libgif, try libungif.
2176 if test x"$try_libungif" = xyes; then 2207 AC_CHECK_LIB(ungif, EGifPutExtensionLast, HAVE_GIF=yes, HAVE_GIF=no)
2177 AC_CHECK_LIB(ungif, EGifPutExtensionLast, HAVE_GIF=yes) 2208 test "$HAVE_GIF" = yes && LIBGIF=-lungif
2178
2179 if test "$HAVE_GIF" = yes; then
2180 AC_DEFINE(LIBGIF, -lungif, [Compiler option to link with the gif library (if not -lgif).])
2181 ac_gif_lib_name="-lungif"
2182 fi
2183 fi 2209 fi
2184 2210
2185 if test "${HAVE_GIF}" = "yes"; then 2211 if test "${HAVE_GIF}" = "yes"; then
2186 AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have a gif library (default -lgif; otherwise specify with LIBGIF).]) 2212 AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have a gif (or ungif) library.])
2187 fi 2213 fi
2188fi 2214fi
2215AC_SUBST(LIBGIF)
2189 2216
2190dnl Check for required libraries. 2217dnl Check for required libraries.
2191if test "${HAVE_X11}" = "yes"; then 2218if test "${HAVE_X11}" = "yes"; then
@@ -2214,14 +2241,17 @@ fi
2214 2241
2215### Use -lgpm if available, unless `--with-gpm=no'. 2242### Use -lgpm if available, unless `--with-gpm=no'.
2216HAVE_GPM=no 2243HAVE_GPM=no
2244LIBGPM=
2217if test "${with_gpm}" != "no"; then 2245if test "${with_gpm}" != "no"; then
2218 AC_CHECK_HEADER(gpm.h, 2246 AC_CHECK_HEADER(gpm.h,
2219 [AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes)]) 2247 [AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes)])
2220fi
2221 2248
2222if test "${HAVE_GPM}" = "yes"; then 2249 if test "${HAVE_GPM}" = "yes"; then
2223 AC_DEFINE(HAVE_GPM, 1, [Define to 1 if you have the gpm library (-lgpm).]) 2250 AC_DEFINE(HAVE_GPM, 1, [Define to 1 if you have the gpm library (-lgpm).])
2251 LIBGPM=-lgpm
2252 fi
2224fi 2253fi
2254AC_SUBST(LIBGPM)
2225 2255
2226dnl Check for malloc/malloc.h on darwin 2256dnl Check for malloc/malloc.h on darwin
2227AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.])]) 2257AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.])])
@@ -2286,13 +2316,24 @@ AC_CHECK_LIB(m, sqrt)
2286 2316
2287# Check for mail-locking functions in a "mail" library. Probably this should 2317# Check for mail-locking functions in a "mail" library. Probably this should
2288# have the same check as for liblockfile below. 2318# have the same check as for liblockfile below.
2289AC_CHECK_LIB(mail, maillock) 2319AC_CHECK_LIB(mail, maillock, have_mail=yes, have_mail=no)
2320if test $have_mail = yes; then
2321 LIBS_MAIL=-lmail
2322 LIBS="$LIBS_MAIL $LIBS"
2323 AC_DEFINE(HAVE_LIBMAIL, 1, [Define to 1 if you have the `mail' library (-lmail).])
2324else
2325 LIBS_MAIL=
2326fi
2290dnl Debian, at least: 2327dnl Debian, at least:
2291AC_CHECK_LIB(lockfile, maillock) 2328AC_CHECK_LIB(lockfile, maillock, have_lockfile=yes, have_lockfile=no)
2329if test $have_lockfile = yes; then
2330 LIBS_MAIL=-llockfile
2331 LIBS="$LIBS_MAIL $LIBS"
2332 AC_DEFINE(HAVE_LIBLOCKFILE, 1, [Define to 1 if you have the `lockfile' library (-llockfile).])
2333else
2292# If we have the shared liblockfile, assume we must use it for mail 2334# If we have the shared liblockfile, assume we must use it for mail
2293# locking (e.g. Debian). If we couldn't link against liblockfile 2335# locking (e.g. Debian). If we couldn't link against liblockfile
2294# (no liblockfile.a installed), ensure that we don't need to. 2336# (no liblockfile.a installed), ensure that we don't need to.
2295if test "$ac_cv_lib_lockfile_maillock" = no; then
2296 dnl This works for files generally, not just executables. 2337 dnl This works for files generally, not just executables.
2297 dnl Should we look elsewhere for it? Maybe examine /etc/ld.so.conf? 2338 dnl Should we look elsewhere for it? Maybe examine /etc/ld.so.conf?
2298 AC_CHECK_PROG(liblockfile, liblockfile.so, yes, no, 2339 AC_CHECK_PROG(liblockfile, liblockfile.so, yes, no,
@@ -2301,11 +2342,11 @@ if test "$ac_cv_lib_lockfile_maillock" = no; then
2301 AC_MSG_ERROR([Shared liblockfile found but can't link against it. 2342 AC_MSG_ERROR([Shared liblockfile found but can't link against it.
2302This probably means that movemail could lose mail. 2343This probably means that movemail could lose mail.
2303There may be a `development' package to install containing liblockfile.]) 2344There may be a `development' package to install containing liblockfile.])
2304 else :
2305 fi 2345 fi
2306fi 2346fi
2307AC_CHECK_FUNCS(touchlock) 2347AC_CHECK_FUNCS(touchlock)
2308AC_CHECK_HEADERS(maillock.h) 2348AC_CHECK_HEADERS(maillock.h)
2349AC_SUBST(LIBS_MAIL)
2309 2350
2310AC_CHECK_FUNCS(gethostname getdomainname dup2 \ 2351AC_CHECK_FUNCS(gethostname getdomainname dup2 \
2311rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ 2352rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
@@ -2383,8 +2424,9 @@ if test "$have_res_init" = yes; then
2383fi 2424fi
2384 2425
2385# Do we need the Hesiod library to provide the support routines? 2426# Do we need the Hesiod library to provide the support routines?
2427LIBHESIOD=
2386if test "$with_hesiod" != no ; then 2428if test "$with_hesiod" != no ; then
2387 # Don't set $LIBS here -- see comments above. 2429 # Don't set $LIBS here -- see comments above. FIXME which comments?
2388 AC_CHECK_FUNC(res_send, , [AC_CHECK_FUNC(__res_send, , 2430 AC_CHECK_FUNC(res_send, , [AC_CHECK_FUNC(__res_send, ,
2389 [AC_CHECK_LIB(resolv, res_send, resolv=yes, 2431 [AC_CHECK_LIB(resolv, res_send, resolv=yes,
2390 [AC_CHECK_LIB(resolv, __res_send, resolv=yes)])])]) 2432 [AC_CHECK_LIB(resolv, __res_send, resolv=yes)])])])
@@ -2394,28 +2436,86 @@ if test "$with_hesiod" != no ; then
2394 RESOLVLIB= 2436 RESOLVLIB=
2395 fi 2437 fi
2396 AC_CHECK_FUNC(hes_getmailhost, , [AC_CHECK_LIB(hesiod, hes_getmailhost, 2438 AC_CHECK_FUNC(hes_getmailhost, , [AC_CHECK_LIB(hesiod, hes_getmailhost,
2397 [AC_DEFINE(HAVE_LIBHESIOD, 1, 2439 hesiod=yes, :, $RESOLVLIB)])
2398 [Define to 1 if you have the hesiod library (-lhesiod).])], 2440
2399 :, $RESOLVLIB)]) 2441 if test x"$hesiod" = xyes; then
2442 AC_DEFINE(HAVE_LIBHESIOD, 1,
2443 [Define to 1 if you have the hesiod library (-lhesiod).])
2444 LIBHESIOD=-lhesiod
2445 fi
2400fi 2446fi
2447AC_SUBST(LIBHESIOD)
2401 2448
2402# Do we need libresolv (due to res_init or Hesiod)? 2449# Do we need libresolv (due to res_init or Hesiod)?
2403if test "$resolv" = yes ; then 2450if test "$resolv" = yes ; then
2404 AC_DEFINE(HAVE_LIBRESOLV, 1, 2451 AC_DEFINE(HAVE_LIBRESOLV, 1,
2405 [Define to 1 if you have the resolv library (-lresolv).]) 2452 [Define to 1 if you have the resolv library (-lresolv).])
2453 LIBRESOLV=-lresolv
2454else
2455 LIBRESOLV=
2406fi 2456fi
2457AC_SUBST(LIBRESOLV)
2407 2458
2408# These tell us which Kerberos-related libraries to use. 2459# These tell us which Kerberos-related libraries to use.
2460COM_ERRLIB=
2461CRYPTOLIB=
2462KRB5LIB=
2463DESLIB=
2464KRB4LIB=
2465
2409if test "${with_kerberos}" != no; then 2466if test "${with_kerberos}" != no; then
2410 AC_CHECK_LIB(com_err, com_err) 2467 AC_CHECK_LIB(com_err, com_err, have_com_err=yes, have_com_err=no)
2411 AC_CHECK_LIB(k5crypto, mit_des_cbc_encrypt) 2468 if test $have_com_err = yes; then
2412 AC_CHECK_LIB(crypto, mit_des_cbc_encrypt) 2469 COM_ERRLIB=-lcom_err
2413 AC_CHECK_LIB(krb5, krb5_init_context) 2470 LIBS="$COM_ERRLIB $LIBS"
2471 AC_DEFINE(HAVE_LIBCOM_ERR, 1, [Define to 1 if you have the `com_err' library (-lcom_err).])
2472 fi
2473 AC_CHECK_LIB(crypto, mit_des_cbc_encrypt, have_crypto=yes, have_crypto=no)
2474 if test $have_crypto = yes; then
2475 CRYPTOLIB=-lcrypto
2476 LIBS="$CRYPTOLIB $LIBS"
2477 AC_DEFINE(HAVE_LIBCRYPTO, 1, [Define to 1 if you have the `crypto' library (-lcrypto).])
2478 fi
2479 AC_CHECK_LIB(k5crypto, mit_des_cbc_encrypt, have_k5crypto=yes, have_k5crypto=no)
2480 if test $have_k5crypto = yes; then
2481 CRYPTOLIB=-lk5crypto
2482 LIBS="$CRYPTOLIB $LIBS"
2483 AC_DEFINE(HAVE_LIBK5CRYPTO, 1, [Define to 1 if you have the `k5crypto' library (-lk5crypto).])
2484 fi
2485 AC_CHECK_LIB(krb5, krb5_init_context, have_krb5=yes, have_krb5=no)
2486 if test $have_krb5=yes; then
2487 KRB5LIB=-lkrb5
2488 LIBS="$KRB5LIB $LIBS"
2489 AC_DEFINE(HAVE_LIBKRB5, 1, [Define to 1 if you have the `krb5' library (-lkrb5).])
2490 fi
2491 dnl FIXME Simplify. Does not match 22 logic, thanks to default_off?
2414 if test "${with_kerberos5}" = no; then 2492 if test "${with_kerberos5}" = no; then
2415 AC_CHECK_LIB(des425, des_cbc_encrypt,, 2493 AC_CHECK_LIB(des425, des_cbc_encrypt, have_des425=yes, have_des425=no )
2416 [AC_CHECK_LIB(des, des_cbc_encrypt)]) 2494 if test $have_des425 = yes; then
2417 AC_CHECK_LIB(krb4, krb_get_cred,, 2495 DESLIB=-ldes425
2418 [AC_CHECK_LIB(krb, krb_get_cred)]) 2496 LIBS="$DESLIB $LIBS"
2497 AC_DEFINE(HAVE_LIBDES425, 1, [Define to 1 if you have the `des425' library (-ldes425).])
2498 else
2499 AC_CHECK_LIB(des, des_cbc_encrypt, have_des=yes, have_des=no)
2500 if test $have_des = yes; then
2501 DESLIB=-ldes
2502 LIBS="$DESLIB $LIBS"
2503 AC_DEFINE(HAVE_LIBDES, 1, [Define to 1 if you have the `des' library (-ldes).])
2504 fi
2505 fi
2506 AC_CHECK_LIB(krb4, krb_get_cred, have_krb4=yes, have_krb4=no)
2507 if test $have_krb4 = yes; then
2508 KRB4LIB=-lkrb4
2509 LIBS="$KRB4LIB $LIBS"
2510 AC_DEFINE(HAVE_LIBKRB4, 1, [Define to 1 if you have the `krb4' library (-lkrb4).])
2511 else
2512 AC_CHECK_LIB(krb, krb_get_cred, have_krb=yes, have_krb=no)
2513 if test $have_krb = yes; then
2514 KRB4LIB=-lkrb
2515 LIBS="$KRB4LIB $LIBS"
2516 AC_DEFINE(HAVE_LIBKRB, 1, [Define to 1 if you have the `krb' library (-lkrb).])
2517 fi
2518 fi
2419 fi 2519 fi
2420 2520
2421 if test "${with_kerberos5}" != no; then 2521 if test "${with_kerberos5}" != no; then
@@ -2433,6 +2533,12 @@ if test "${with_kerberos}" != no; then
2433 AC_CHECK_HEADERS(com_err.h) 2533 AC_CHECK_HEADERS(com_err.h)
2434fi 2534fi
2435 2535
2536AC_SUBST(COM_ERRLIB)
2537AC_SUBST(CRYPTOLIB)
2538AC_SUBST(KRB5LIB)
2539AC_SUBST(DESLIB)
2540AC_SUBST(KRB4LIB)
2541
2436# Solaris requires -lintl if you want strerror (which calls dgettext) 2542# Solaris requires -lintl if you want strerror (which calls dgettext)
2437# to return localized messages. 2543# to return localized messages.
2438AC_CHECK_LIB(intl, dgettext) 2544AC_CHECK_LIB(intl, dgettext)
@@ -3009,7 +3115,7 @@ echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
3009echo " Does Emacs use -lXpm? ${HAVE_XPM}" 3115echo " Does Emacs use -lXpm? ${HAVE_XPM}"
3010echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" 3116echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
3011echo " Does Emacs use -ltiff? ${HAVE_TIFF}" 3117echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
3012echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name" 3118echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
3013echo " Does Emacs use -lpng? ${HAVE_PNG}" 3119echo " Does Emacs use -lpng? ${HAVE_PNG}"
3014echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" 3120echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
3015echo " Does Emacs use -lgpm? ${HAVE_GPM}" 3121echo " Does Emacs use -lgpm? ${HAVE_GPM}"
diff --git a/etc/NEWS b/etc/NEWS
index ee4ec1370cb..3299995ad96 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -24,6 +24,12 @@ so we will look at it and add it to the manual.
24 24
25* Installation Changes in Emacs 24.1 25* Installation Changes in Emacs 24.1
26 26
27---
28** There are new configure options:
29--with-mmdf, --with-mail-unlink, --with-mailhost.
30These provide no new functionality, they just remove the need to edit
31lib-src/Makefile by hand in order to use the associated features.
32
27 33
28* Startup Changes in Emacs 24.1 34* Startup Changes in Emacs 24.1
29 35
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index a6b003d2150..998d3370c44 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,9 @@
12010-03-18 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in (KRB4LIB, DESLIB, KRB5LIB, CRYPTOLIB, COM_ERRLIB)
4 (HESIODLIB, LIBS_MAIL): Set using autoconf rather than cpp.
5 (BASE_CFLAGS): Remove (identical to CPP_CFLAGS).
6
12010-03-18 Tetsurou Okazaki <okazaki@be.to> (tiny change) 72010-03-18 Tetsurou Okazaki <okazaki@be.to> (tiny change)
2 8
3 * Makefile.in (uninstall): Handle the case where archlibdir does not 9 * Makefile.in (uninstall): Handle the case where archlibdir does not
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 8a147038a4c..fa928745996 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -1,6 +1,7 @@
1# Makefile for lib-src subdirectory in GNU Emacs. 1# Makefile for lib-src subdirectory in GNU Emacs.
2# Copyright (C) 1985, 1987, 1988, 1993, 1994, 2001, 2002, 2003, 2004, 2# Copyright (C) 1985, 1987, 1988, 1993, 1994, 2001, 2002, 2003, 2004,
3# 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 3# 2005, 2006, 2007, 2008, 2009, 2010
4# Free Software Foundation, Inc.
4 5
5# This file is part of GNU Emacs. 6# This file is part of GNU Emacs.
6 7
@@ -122,20 +123,11 @@ SCRIPTS= rcs2log vcdiff
122 123
123EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} 124EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
124 125
125# Additional -D flags for movemail (add to MOVE_FLAGS if desired): 126# Specify additional -D flags for movemail. Options:
126# MAIL_USE_POP Support mail retrieval from a POP mailbox. 127# -DMAIL_USE_FLOCK or -DMAIL_USE_LOCKF (use flock or lockf for file locking).
127# MAIL_USE_MMDF Support MMDF mailboxes. 128# See the comments about locking in movemail.c. Normally the values
128# MAIL_USE_FLOCK Use flock for file locking (see the comments 129# in ../src/[ms]/*.h should be correct and you should not need to do anything.
129# about locking in movemail.c) 130# If neither flag is set, blessmail is used.
130# MAIL_UNLINK_SPOOL Unlink the user's spool mailbox after reading
131# it (instead of just emptying it).
132# KERBEROS Support Kerberized POP.
133# KRB5 Support Kerberos Version 5 pop instead of
134# Version 4 (define this in addition to
135# KERBEROS).
136# HESIOD Support Hesiod lookups of user mailboxes.
137# MAILHOST A string, the host name of the default POP
138# mail host for the site.
139MOVE_FLAGS= 131MOVE_FLAGS=
140 132
141# ========================== start of cpp stuff ======================= 133# ========================== start of cpp stuff =======================
@@ -176,72 +168,21 @@ MOVE_FLAGS=
176#define BLESSMAIL 168#define BLESSMAIL
177#endif 169#endif
178 170
179#ifdef KERBEROS 171LIBS_MOVE=@KRB4LIB@ @DESLIB@ @KRB5LIB@ @CRYPTOLIB@ @COM_ERRLIB@ @LIBHESIOD@ @LIBRESOLV@
180# ifdef HAVE_LIBKRB
181 KRB4LIB = -lkrb
182# else
183# ifdef HAVE_LIBKRB4
184 KRB4LIB = -lkrb4
185# endif
186# endif
187# ifdef HAVE_LIBDES
188 DESLIB = -ldes
189# else
190# ifdef HAVE_LIBDES425
191 DESLIB = -ldes425
192# endif
193# endif
194# ifdef HAVE_LIBKRB5
195 KRB5LIB = -lkrb5
196# endif
197# ifdef HAVE_LIBK5CRYPTO
198 CRYPTOLIB = -lk5crypto
199# else
200# ifdef HAVE_LIBCRYPTO
201 CRYPTOLIB = -lcrypto
202# endif
203# endif
204# ifdef HAVE_LIBCOM_ERR
205 COM_ERRLIB = -lcom_err
206# endif
207#endif /* KERBEROS */
208
209/* If HESIOD is defined, set this to "-lhesiod". */
210#ifdef HAVE_LIBHESIOD
211# ifdef HAVE_LIBRESOLV
212 HESIODLIB= -lhesiod -lresolv
213# else
214 HESIODLIB= -lhesiod
215# endif
216#endif
217
218LIBS_MOVE=$(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) $(COM_ERRLIB) $(HESIODLIB)
219 172
220#ifdef HAVE_LIBLOCKFILE 173LIBS_MAIL=@LIBS_MAIL@
221LIBS_MAIL=-llockfile
222#else
223#ifdef HAVE_LIBMAIL
224LIBS_MAIL=-lmail
225#endif
226#endif
227 174
228LOADLIBES=LIBS_SYSTEM LIBS_MACHINE 175LOADLIBES=LIBS_SYSTEM LIBS_MACHINE
229 176
230/* We need to #define emacs to get the right versions of some files. 177/* Those files shared with other GNU utilities need HAVE_CONFIG_H
231 Some other files - those shared with other GNU utilities - need 178 defined before they know they can take advantage of the information
232 HAVE_CONFIG_H #defined before they know they can take advantage of 179 in ../src/config.h. */
233 the information in ../src/config.h. */
234ALL_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ 180ALL_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \
235 -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} 181 -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
236LINK_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ 182LINK_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \
237 -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS} 183 -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS}
238CPP_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ 184CPP_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \
239 -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} 185 -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS}
240/* This was all of CPP_CFLAGS except -Demacs.
241 Now that -Demacs has been deleted from CPP_CFLAGS,
242 this is actually the same as CPP_CFLAGS, but let\'s not delete it yet. */
243BASE_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \
244 -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS}
245 186
246.SUFFIXES: .m 187.SUFFIXES: .m
247 188
@@ -394,7 +335,7 @@ REGEXPOBJ = regex.o
394REGEXPDEPS = $(REGEXPOBJ) $(srcdir)/../src/regex.h 335REGEXPDEPS = $(REGEXPOBJ) $(srcdir)/../src/regex.h
395 336
396regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h 337regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h
397 ${CC} -c ${BASE_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c 338 ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c
398 339
399etags${EXEEXT}: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h 340etags${EXEEXT}: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h
400 $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags 341 $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags
@@ -426,6 +367,7 @@ b2m${EXEEXT}: ${srcdir}/b2m.c ../src/config.h $(GETOPTDEPS)
426movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS) 367movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS)
427 $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MAIL) $(LIBS_MOVE) -o movemail 368 $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MAIL) $(LIBS_MOVE) -o movemail
428 369
370/* We need to define emacs to get the right version of something (what?). */
429movemail.o: ${srcdir}/movemail.c ../src/config.h $(GETOPT_H) 371movemail.o: ${srcdir}/movemail.c ../src/config.h $(GETOPT_H)
430 $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c 372 $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c
431 373
diff --git a/src/ChangeLog b/src/ChangeLog
index e62f3cb8bc3..e353c9e1147 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12010-03-18 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in (XFT_LIBS, LIBXPM, LIBJPEG, LIBPNG, LIBTIFF, LIBGIF)
4 (LIBGPM, LIBRESOLV): Set using autoconf rather than cpp.
5
12010-03-15 Chong Yidong <cyd@stupidchicken.com> 62010-03-15 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * xfns.c (Fx_create_frame): 8 * xfns.c (Fx_create_frame):
diff --git a/src/Makefile.in b/src/Makefile.in
index 06b4ef0e645..5ac83e71e95 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -369,76 +369,16 @@ LIBXT=$(LIBW)
369#endif 369#endif
370#endif /* not USE_X_TOOLKIT */ 370#endif /* not USE_X_TOOLKIT */
371 371
372#if HAVE_XFT
373XFT_LIBS=@XFT_LIBS@
374#endif /* HAVE_XFT */
375
376#if HAVE_XPM
377#ifndef LIBXPM
378#define LIBXPM -lXpm
379#endif /* not defined LIBXPM */
380#else /* not HAVE_XPM */
381#define LIBXPM
382#endif /* not HAVE_XPM */
383
384#if HAVE_JPEG
385#ifndef LIBJPEG
386#define LIBJPEG -ljpeg
387#endif /* not defined LIBJPEG */
388#else /* not HAVE_JPEG */
389#define LIBJPEG
390#endif /* not HAVE_JPEG */
391
392#if HAVE_PNG
393#ifndef LIBPNG
394#define LIBPNG -lpng -lz -lm
395#endif /* not defined LIBPNG */
396#else /* not HAVE_PNG */
397#define LIBPNG
398#endif /* not HAVE_PNG */
399
400#if HAVE_TIFF
401#ifndef LIBTIFF
402#define LIBTIFF -ltiff
403#endif /* not defined LIBTIFF */
404#else /* not HAVE_TIFF */
405#define LIBTIFF
406#endif /* not HAVE_TIFF */
407
408#if HAVE_GIF
409#ifndef LIBGIF
410#define LIBGIF -lgif
411#endif /* not defined LIBGIF */
412#else /* not HAVE_GIF */
413#define LIBGIF
414#endif /* not HAVE_GIF */
415
416#ifdef HAVE_X11 372#ifdef HAVE_X11
417/* LD_SWITCH_X_DEFAULT comes after everything else that specifies 373/* LD_SWITCH_X_DEFAULT comes after everything else that specifies
418 options for where to find X libraries, but before those libraries. */ 374 options for where to find X libraries, but before those libraries. */
419X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT 375X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
420LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_SYSTEM $(XFT_LIBS) 376LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) @LIBTIFF@ @LIBJPEG@ @LIBPNG@ @LIBGIF@ @LIBXPM@ LIB_X11_LIB LIBX11_SYSTEM @XFT_LIBS@
421#else /* not HAVE_X11 */ 377#else /* not HAVE_X11 */
422LIBX= $(LIBXMENU) LD_SWITCH_X_SITE 378LIBX= $(LIBXMENU) LD_SWITCH_X_SITE
423#endif /* not HAVE_X11 */ 379#endif /* not HAVE_X11 */
424#endif /* not HAVE_X_WINDOWS */ 380#endif /* not HAVE_X_WINDOWS */
425 381
426#if HAVE_GPM
427#ifndef LIBGPM
428#define LIBGPM -lgpm
429#endif /* not defined LIBGPM */
430#else /* not HAVE_GPM */
431#define LIBGPM
432#endif /* not HAVE_GPM */
433
434#if HAVE_LIBRESOLV
435#ifndef LIBRESOLV
436#define LIBRESOLV -lresolv
437#endif /* not defined LIBRESOLV */
438#else /* not HAVE_LIBRESOLV */
439#define LIBRESOLV
440#endif /* not HAVE_LIBRESOLV */
441
442LIBSOUND= @LIBSOUND@ 382LIBSOUND= @LIBSOUND@
443CFLAGS_SOUND= @CFLAGS_SOUND@ 383CFLAGS_SOUND= @CFLAGS_SOUND@
444 384
@@ -908,7 +848,7 @@ SOME_MACHINE_LISP = ../lisp/mouse.elc \
908 with GCC, we might need gnulib again after them. */ 848 with GCC, we might need gnulib again after them. */
909 849
910LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \ 850LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \
911 LIBGPM LIBRESOLV LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \ 851 @LIBGPM@ @LIBRESOLV@ LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
912 LIBS_DEBUG $(GETLOADAVG_LIBS) ${GCONF_LIBS} \ 852 LIBS_DEBUG $(GETLOADAVG_LIBS) ${GCONF_LIBS} \
913 @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \ 853 @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
914 $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR) 854 $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)