From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Patch to replace some cpp with autoconf Date: Sat, 22 Aug 2009 18:54:24 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250982442 28181 80.91.229.12 (22 Aug 2009 23:07:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Aug 2009 23:07:22 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 23 01:07:15 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mezg2-0005rV-9B for ged-emacs-devel@m.gmane.org; Sun, 23 Aug 2009 01:07:15 +0200 Original-Received: from localhost ([127.0.0.1]:37410 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mezg1-0003Z3-Lf for ged-emacs-devel@m.gmane.org; Sat, 22 Aug 2009 19:07:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mezfs-0003Vs-De for emacs-devel@gnu.org; Sat, 22 Aug 2009 19:07:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mezfn-0003TI-MH for emacs-devel@gnu.org; Sat, 22 Aug 2009 19:07:03 -0400 Original-Received: from [199.232.76.173] (port=40761 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mezfn-0003TC-7o for emacs-devel@gnu.org; Sat, 22 Aug 2009 19:06:59 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:33443) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mezfm-0006mq-DM for emacs-devel@gnu.org; Sat, 22 Aug 2009 19:06:58 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MezTc-0000nq-R0; Sat, 22 Aug 2009 18:54:24 -0400 X-Spook: PGP Fedayeen spies JUWTF EuroFed militia Echelon DES X-Ran: ^[@XI,V7)qyKho3wi`%pP"LNrJZ{y:=|f2w:~PT!>5@<|FiB$>VDr!roK*6%|Nn9Dm.O'J X-Hue: magenta X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114520 Archived-At: Here is a patch to replace some of the cpp stuff used to generate the Makefiles with autoconf. Is this acceptable for the trunk at this time? 2009-08-22 Glenn Morris * 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. Index: configure.in =================================================================== RCS file: /sources/emacs/emacs/configure.in,v retrieving revision 1.606 diff -c -c -w -r1.606 configure.in *** configure.in 22 Aug 2009 08:47:01 -0000 1.606 --- configure.in 22 Aug 2009 22:49:47 -0000 *************** *** 91,100 **** --- 91,116 ---- fi OPTION_DEFAULT_OFF([hesiod],[support Hesiod to get the POP server host]) + dnl FIXME hesiod support may not be present, so it seems like an error + dnl to define, or at least use, this unconditionally. if test "$with_hesiod" != no; then AC_DEFINE(HESIOD, 1, [Define to support using a Hesiod database to find the POP server.]) fi + OPTION_DEFAULT_OFF([mmdf],[support MMDF mailboxes]) + if test "$with_mmdf" != no; then + AC_DEFINE(MAIL_USE_MMDF, 1, [Define to support MMDF mailboxes in movemail.]) + fi + + OPTION_DEFAULT_OFF([mail-unlink],[unlink, rather than empty, mail spool after reading]) + if test "$with_mail_unlink" != no; then + AC_DEFINE(MAIL_UNLINK_SPOOL, 1, [Define to unlink, rather than empty, mail spool after reading.]) + fi + + AC_ARG_WITH([mailhost],[AS_HELP_STRING([--with-mailhost=HOSTNAME], + [string giving default POP mail host])], + AC_DEFINE_UNQUOTED(MAILHOST, ["$withval"], [String giving fallback POP mail host.])) + OPTION_DEFAULT_ON([sound],[don't compile with sound support]) OPTION_DEFAULT_ON([sync-input],[process async input synchronously]) *************** *** 2024,2029 **** --- 2040,2046 ---- ### Use -lXpm if available, unless `--with-xpm=no'. HAVE_XPM=no + LIBXPM= if test "${HAVE_X11}" = "yes"; then if test "${with_xpm}" != "no"; then AC_CHECK_HEADER(X11/xpm.h, *************** *** 2047,2057 **** --- 2064,2077 ---- if test "${HAVE_XPM}" = "yes"; then AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm libary (-lXpm).]) + LIBXPM=-lXpm fi fi + AC_SUBST(LIBXPM) ### Use -ljpeg if available, unless `--with-jpeg=no'. HAVE_JPEG=no + LIBJPEG= if test "${HAVE_X11}" = "yes"; then if test "${with_jpeg}" != "no"; then dnl Checking for jpeglib.h can lose because of a redefinition of *************** *** 2071,2080 **** --- 2091,2105 ---- [AC_MSG_WARN([libjpeg found, but not version 6b or later]) HAVE_JPEG=no]) fi + if test "${HAVE_JPEG}" = "yes"; then + LIBJPEG=-ljpeg + fi fi + AC_SUBST(LIBJPEG) ### Use -lpng if available, unless `--with-png=no'. HAVE_PNG=no + LIBPNG= if test "${HAVE_X11}" = "yes"; then if test "${with_png}" != "no"; then # Debian unstable as of July 2003 has multiple libpngs, and puts png.h *************** *** 2087,2097 **** --- 2112,2125 ---- if test "${HAVE_PNG}" = "yes"; then AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).]) + LIBPNG="-lpng -lz -lm" fi fi + AC_SUBST(LIBPNG) ### Use -ltiff if available, unless `--with-tiff=no'. HAVE_TIFF=no + LIBTIFF= if test "${HAVE_X11}" = "yes"; then if test "${with_tiff}" != "no"; then AC_CHECK_HEADER(tiffio.h, *************** *** 2103,2137 **** if test "${HAVE_TIFF}" = "yes"; then AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).]) fi fi ### Use -lgif or -lungif if available, unless `--with-gif=no'. HAVE_GIF=no if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then AC_CHECK_HEADER(gif_lib.h, # EGifPutExtensionLast only exists from version libungif-4.1.0b1. # Earlier versions can crash Emacs. ! [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, try_libungif=yes)]) if test "$HAVE_GIF" = yes; then ! ac_gif_lib_name="-lgif" ! fi ! # If gif_lib.h but no libgif, try libungif. ! if test x"$try_libungif" = xyes; then ! AC_CHECK_LIB(ungif, EGifPutExtensionLast, HAVE_GIF=yes) ! ! if test "$HAVE_GIF" = yes; then ! AC_DEFINE(LIBGIF, -lungif, [Compiler option to link with the gif library (if not -lgif).]) ! ac_gif_lib_name="-lungif" ! fi fi if test "${HAVE_GIF}" = "yes"; then ! AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have a gif library (default -lgif; otherwise specify with LIBGIF).]) fi fi dnl Check for required libraries. if test "${HAVE_X11}" = "yes"; then --- 2131,2164 ---- if test "${HAVE_TIFF}" = "yes"; then AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).]) + dnl FIXME -lz -lm, as per libpng? + LIBTIFF=-ltiff fi fi + AC_SUBST(LIBTIFF) ### Use -lgif or -lungif if available, unless `--with-gif=no'. HAVE_GIF=no + LIBGIF= if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then AC_CHECK_HEADER(gif_lib.h, # EGifPutExtensionLast only exists from version libungif-4.1.0b1. # Earlier versions can crash Emacs. ! [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, HAVE_GIF=maybe)]) if test "$HAVE_GIF" = yes; then ! LIBGIF=-lgif ! elif test "$HAVE_GIF" = maybe; then # If gif_lib.h but no libgif, try libungif. ! AC_CHECK_LIB(ungif, EGifPutExtensionLast, HAVE_GIF=yes, HAVE_GIF=no) ! test "$HAVE_GIF" = yes && LIBGIF=-lungif fi if test "${HAVE_GIF}" = "yes"; then ! AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have a gif (or ungif) library.]) fi fi + AC_SUBST(LIBGIF) dnl Check for required libraries. if test "${HAVE_X11}" = "yes"; then *************** *** 2160,2173 **** ### Use -lgpm if available, unless `--with-gpm=no'. HAVE_GPM=no if test "${with_gpm}" != "no"; then AC_CHECK_HEADER(gpm.h, [AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes)]) - fi if test "${HAVE_GPM}" = "yes"; then AC_DEFINE(HAVE_GPM, 1, [Define to 1 if you have the gpm library (-lgpm).]) fi dnl Check for malloc/malloc.h on darwin AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the header file.])]) --- 2187,2203 ---- ### Use -lgpm if available, unless `--with-gpm=no'. HAVE_GPM=no + LIBGPM= if test "${with_gpm}" != "no"; then AC_CHECK_HEADER(gpm.h, [AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes)]) if test "${HAVE_GPM}" = "yes"; then AC_DEFINE(HAVE_GPM, 1, [Define to 1 if you have the gpm library (-lgpm).]) + LIBGPM=-lgpm fi + fi + AC_SUBST(LIBGPM) dnl Check for malloc/malloc.h on darwin AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the header file.])]) *************** *** 2231,2243 **** # Check for mail-locking functions in a "mail" library. Probably this should # have the same check as for liblockfile below. ! AC_CHECK_LIB(mail, maillock) dnl Debian, at least: ! AC_CHECK_LIB(lockfile, maillock) # If we have the shared liblockfile, assume we must use it for mail # locking (e.g. Debian). If we couldn't link against liblockfile # (no liblockfile.a installed), ensure that we don't need to. - if test "$ac_cv_lib_lockfile_maillock" = no; then dnl This works for files generally, not just executables. dnl Should we look elsewhere for it? Maybe examine /etc/ld.so.conf? AC_CHECK_PROG(liblockfile, liblockfile.so, yes, no, --- 2261,2284 ---- # Check for mail-locking functions in a "mail" library. Probably this should # have the same check as for liblockfile below. ! AC_CHECK_LIB(mail, maillock, have_mail=yes, have_mail=no) ! if test $have_mail = yes; then ! LIBS_MAIL=-lmail ! LIBS="$LIBS_MAIL $LIBS" ! AC_DEFINE(HAVE_LIBMAIL, 1, [Define to 1 if you have the `mail' library (-lmail).]) ! else ! LIBS_MAIL= ! fi dnl Debian, at least: ! AC_CHECK_LIB(lockfile, maillock, have_lockfile=yes, have_lockfile=no) ! if test $have_lockfile = yes; then ! LIBS_MAIL=-llockfile ! LIBS="$LIBS_MAIL $LIBS" ! AC_DEFINE(HAVE_LIBLOCKFILE, 1, [Define to 1 if you have the `lockfile' library (-llockfile).]) ! else # If we have the shared liblockfile, assume we must use it for mail # locking (e.g. Debian). If we couldn't link against liblockfile # (no liblockfile.a installed), ensure that we don't need to. dnl This works for files generally, not just executables. dnl Should we look elsewhere for it? Maybe examine /etc/ld.so.conf? AC_CHECK_PROG(liblockfile, liblockfile.so, yes, no, *************** *** 2246,2256 **** AC_MSG_ERROR([Shared liblockfile found but can't link against it. This probably means that movemail could lose mail. There may be a `development' package to install containing liblockfile.]) - else : fi fi AC_CHECK_FUNCS(touchlock) AC_CHECK_HEADERS(maillock.h) AC_CHECK_FUNCS(gethostname getdomainname dup2 \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ --- 2287,2297 ---- AC_MSG_ERROR([Shared liblockfile found but can't link against it. This probably means that movemail could lose mail. There may be a `development' package to install containing liblockfile.]) fi fi AC_CHECK_FUNCS(touchlock) AC_CHECK_HEADERS(maillock.h) + AC_SUBST(LIBS_MAIL) AC_CHECK_FUNCS(gethostname getdomainname dup2 \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ *************** *** 2328,2335 **** fi # Do we need the Hesiod library to provide the support routines? if test "$with_hesiod" != no ; then ! # Don't set $LIBS here -- see comments above. 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)])])]) --- 2369,2377 ---- fi # Do we need the Hesiod library to provide the support routines? + LIBHESIOD= if test "$with_hesiod" != no ; then ! # Don't set $LIBS here -- see comments above. FIXME which comments? 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)])])]) *************** *** 2339,2366 **** RESOLVLIB= fi AC_CHECK_FUNC(hes_getmailhost, , [AC_CHECK_LIB(hesiod, hes_getmailhost, ! [AC_DEFINE(HAVE_LIBHESIOD, 1, ! [Define to 1 if you have the hesiod library (-lhesiod).])], ! :, $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}" != no; then ! AC_CHECK_LIB(com_err, com_err) ! AC_CHECK_LIB(k5crypto, mit_des_cbc_encrypt) ! AC_CHECK_LIB(crypto, mit_des_cbc_encrypt) ! AC_CHECK_LIB(krb5, krb5_init_context) if test "${with_kerberos5}" = no; then ! AC_CHECK_LIB(des425, des_cbc_encrypt,, ! [AC_CHECK_LIB(des, des_cbc_encrypt)]) ! AC_CHECK_LIB(krb4, krb_get_cred,, ! [AC_CHECK_LIB(krb, krb_get_cred)]) fi if test "${with_kerberos5}" != no; then --- 2381,2466 ---- RESOLVLIB= fi AC_CHECK_FUNC(hes_getmailhost, , [AC_CHECK_LIB(hesiod, hes_getmailhost, ! hesiod=yes, :, $RESOLVLIB)]) ! ! if test x"$hesiod" = xyes; then ! AC_DEFINE(HAVE_LIBHESIOD, 1, ! [Define to 1 if you have the hesiod library (-lhesiod).]) ! LIBHESIOD=-lhesiod ! fi fi + AC_SUBST(LIBHESIOD) # 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).]) + LIBRESOLV=-lresolv + else + LIBRESOLV= fi + AC_SUBST(LIBRESOLV) # These tell us which Kerberos-related libraries to use. + COM_ERRLIB= + CRYPTOLIB= + KRB5LIB= + DESLIB= + KRB4LIB= + if test "${with_kerberos}" != no; then ! AC_CHECK_LIB(com_err, com_err, have_com_err=yes, have_com_err=no) ! if test $have_com_err = yes; then ! COM_ERRLIB=-lcom_err ! LIBS="$COM_ERRLIB $LIBS" ! AC_DEFINE(HAVE_LIBCOM_ERR, 1, [Define to 1 if you have the `com_err' library (-lcom_err).]) ! fi ! AC_CHECK_LIB(crypto, mit_des_cbc_encrypt, have_crypto=yes, have_crypto=no) ! if test $have_crypto = yes; then ! CRYPTOLIB=-lcrypto ! LIBS="$CRYPTOLIB $LIBS" ! AC_DEFINE(HAVE_LIBCRYPTO, 1, [Define to 1 if you have the `crypto' library (-lcrypto).]) ! fi ! AC_CHECK_LIB(k5crypto, mit_des_cbc_encrypt, have_k5crypto=yes, have_k5crypto=no) ! if test $have_k5crypto = yes; then ! CRYPTOLIB=-lk5crypto ! LIBS="$CRYPTOLIB $LIBS" ! AC_DEFINE(HAVE_LIBK5CRYPTO, 1, [Define to 1 if you have the `k5crypto' library (-lk5crypto).]) ! fi ! AC_CHECK_LIB(krb5, krb5_init_context, have_krb5=yes, have_krb5=no) ! if test $have_krb5=yes; then ! KRB5LIB=-lkrb5 ! LIBS="$KRB5LIB $LIBS" ! AC_DEFINE(HAVE_LIBKRB5, 1, [Define to 1 if you have the `krb5' library (-lkrb5).]) ! fi ! dnl FIXME Simplify. Does not match 22 logic, thanks to default_off? if test "${with_kerberos5}" = no; then ! AC_CHECK_LIB(des425, des_cbc_encrypt, have_des425=yes, have_des425=no ) ! if test $have_des425 = yes; then ! DESLIB=-ldes425 ! LIBS="$DESLIB $LIBS" ! AC_DEFINE(HAVE_LIBDES425, 1, [Define to 1 if you have the `des425' library (-ldes425).]) ! else ! AC_CHECK_LIB(des, des_cbc_encrypt, have_des=yes, have_des=no) ! if test $have_des = yes; then ! DESLIB=-ldes ! LIBS="$DESLIB $LIBS" ! AC_DEFINE(HAVE_LIBDES, 1, [Define to 1 if you have the `des' library (-ldes).]) ! fi ! fi ! AC_CHECK_LIB(krb4, krb_get_cred, have_krb4=yes, have_krb4=no) ! if test $have_krb4 = yes; then ! KRB4LIB=-lkrb4 ! LIBS="$KRB4LIB $LIBS" ! AC_DEFINE(HAVE_LIBKRB4, 1, [Define to 1 if you have the `krb4' library (-lkrb4).]) ! else ! AC_CHECK_LIB(krb, krb_get_cred, have_krb=yes, have_krb=no) ! if test $have_krb = yes; then ! KRB4LIB=-lkrb ! LIBS="$KRB4LIB $LIBS" ! AC_DEFINE(HAVE_LIBKRB, 1, [Define to 1 if you have the `krb' library (-lkrb).]) ! fi ! fi fi if test "${with_kerberos5}" != no; then *************** *** 2378,2383 **** --- 2478,2489 ---- AC_CHECK_HEADERS(com_err.h) fi + AC_SUBST(COM_ERRLIB) + AC_SUBST(CRYPTOLIB) + AC_SUBST(KRB5LIB) + AC_SUBST(DESLIB) + AC_SUBST(KRB4LIB) + # Solaris requires -lintl if you want strerror (which calls dgettext) # to return localized messages. AC_CHECK_LIB(intl, dgettext) *************** *** 2951,2957 **** echo " Does Emacs use -lXpm? ${HAVE_XPM}" echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" echo " Does Emacs use -ltiff? ${HAVE_TIFF}" ! echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name" echo " Does Emacs use -lpng? ${HAVE_PNG}" echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" echo " Does Emacs use -lgpm? ${HAVE_GPM}" --- 3057,3063 ---- echo " Does Emacs use -lXpm? ${HAVE_XPM}" echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" echo " Does Emacs use -ltiff? ${HAVE_TIFF}" ! echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" echo " Does Emacs use -lpng? ${HAVE_PNG}" echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" echo " Does Emacs use -lgpm? ${HAVE_GPM}" Index: Makefile.in =================================================================== RCS file: /sources/emacs/emacs/lib-src/Makefile.in,v retrieving revision 1.174 diff -c -c -w -r1.174 Makefile.in *** Makefile.in 19 Aug 2009 02:56:12 -0000 1.174 --- Makefile.in 22 Aug 2009 22:50:02 -0000 *************** *** 122,141 **** EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} ! # Additional -D flags for movemail (add to MOVE_FLAGS if desired): ! # MAIL_USE_POP Support mail retrieval from a POP mailbox. ! # MAIL_USE_MMDF Support MMDF mailboxes. ! # MAIL_USE_FLOCK Use flock for file locking (see the comments ! # about locking in movemail.c) ! # MAIL_UNLINK_SPOOL Unlink the user's spool mailbox after reading ! # it (instead of just emptying it). ! # KERBEROS Support Kerberized POP. ! # KRB5 Support Kerberos Version 5 pop instead of ! # Version 4 (define this in addition to ! # KERBEROS). ! # HESIOD Support Hesiod lookups of user mailboxes. ! # MAILHOST A string, the host name of the default POP ! # mail host for the site. MOVE_FLAGS= # ========================== start of cpp stuff ======================= --- 122,132 ---- EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} ! # Specify additional -D flags for movemail. Options: ! # -DMAIL_USE_FLOCK or -DMAIL_USE_LOCKF (use flock or lockf for file locking). ! # See the comments about locking in movemail.c. Normally the values ! # in ../src/[ms]/*.h should be correct and you should not need to do anything. ! # If neither flag is set, blessmail is used. MOVE_FLAGS= # ========================== start of cpp stuff ======================= *************** *** 176,247 **** #define BLESSMAIL #endif ! #ifdef KERBEROS ! # ifdef HAVE_LIBKRB ! KRB4LIB = -lkrb ! # else ! # ifdef HAVE_LIBKRB4 ! KRB4LIB = -lkrb4 ! # endif ! # endif ! # ifdef HAVE_LIBDES ! DESLIB = -ldes ! # else ! # ifdef HAVE_LIBDES425 ! DESLIB = -ldes425 ! # endif ! # endif ! # ifdef HAVE_LIBKRB5 ! KRB5LIB = -lkrb5 ! # endif ! # ifdef HAVE_LIBK5CRYPTO ! CRYPTOLIB = -lk5crypto ! # else ! # ifdef HAVE_LIBCRYPTO ! CRYPTOLIB = -lcrypto ! # endif ! # endif ! # ifdef HAVE_LIBCOM_ERR ! COM_ERRLIB = -lcom_err ! # endif ! #endif /* KERBEROS */ ! ! /* If HESIOD is defined, set this to "-lhesiod". */ ! #ifdef HAVE_LIBHESIOD ! # ifdef HAVE_LIBRESOLV ! HESIODLIB= -lhesiod -lresolv ! # else ! HESIODLIB= -lhesiod ! # endif ! #endif ! LIBS_MOVE=$(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) $(COM_ERRLIB) $(HESIODLIB) ! ! #ifdef HAVE_LIBLOCKFILE ! LIBS_MAIL=-llockfile ! #else ! #ifdef HAVE_LIBMAIL ! LIBS_MAIL=-lmail ! #endif ! #endif LOADLIBES=LIBS_SYSTEM LIBS_MACHINE ! /* We need to #define emacs to get the right versions of some files. ! Some other files - those shared with other GNU utilities - need ! HAVE_CONFIG_H #defined before they know they can take advantage of ! the information in ../src/config.h. */ ALL_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} LINK_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS} CPP_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} - /* This was all of CPP_CFLAGS except -Demacs. - Now that -Demacs has been deleted from CPP_CFLAGS, - this is actually the same as CPP_CFLAGS, but let\'s not delete it yet. */ - BASE_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ - -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} .SUFFIXES: .m --- 167,187 ---- #define BLESSMAIL #endif ! LIBS_MOVE=@KRB4LIB@ @DESLIB@ @KRB5LIB@ @CRYPTOLIB@ @COM_ERRLIB@ @LIBHESIOD@ @LIBRESOLV@ ! LIBS_MAIL=@LIBS_MAIL@ LOADLIBES=LIBS_SYSTEM LIBS_MACHINE ! /* Those files shared with other GNU utilities need HAVE_CONFIG_H ! defined before they know they can take advantage of the information ! in ../src/config.h. */ ALL_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} LINK_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS} CPP_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H \ -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} .SUFFIXES: .m *************** *** 392,398 **** REGEXPDEPS = $(REGEXPOBJ) $(srcdir)/../src/regex.h regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h ! ${CC} -c ${BASE_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c etags${EXEEXT}: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags --- 332,338 ---- REGEXPDEPS = $(REGEXPOBJ) $(srcdir)/../src/regex.h regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h ! ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c etags${EXEEXT}: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags *************** *** 424,429 **** --- 364,370 ---- movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS) $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MAIL) $(LIBS_MOVE) -o movemail + /* We need to define emacs to get the right version of something (what?). */ movemail.o: ${srcdir}/movemail.c ../src/config.h $(GETOPT_H) $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c Index: Makefile.in =================================================================== RCS file: /sources/emacs/emacs/src/Makefile.in,v retrieving revision 1.444 diff -c -c -w -r1.444 Makefile.in *** Makefile.in 22 Aug 2009 22:16:59 -0000 1.444 --- Makefile.in 22 Aug 2009 22:50:18 -0000 *************** *** 351,426 **** #endif #endif /* not USE_X_TOOLKIT */ - #if HAVE_XFT - XFT_LIBS=@XFT_LIBS@ - #endif /* HAVE_XFT */ - - #if HAVE_XPM - #ifndef LIBXPM - #define LIBXPM -lXpm - #endif /* not defined LIBXPM */ - #else /* not HAVE_XPM */ - #define LIBXPM - #endif /* not HAVE_XPM */ - - #if HAVE_JPEG - #ifndef LIBJPEG - #define LIBJPEG -ljpeg - #endif /* not defined LIBJPEG */ - #else /* not HAVE_JPEG */ - #define LIBJPEG - #endif /* not HAVE_JPEG */ - - #if HAVE_PNG - #ifndef LIBPNG - #define LIBPNG -lpng -lz -lm - #endif /* not defined LIBPNG */ - #else /* not HAVE_PNG */ - #define LIBPNG - #endif /* not HAVE_PNG */ - - #if HAVE_TIFF - #ifndef LIBTIFF - #define LIBTIFF -ltiff - #endif /* not defined LIBTIFF */ - #else /* not HAVE_TIFF */ - #define LIBTIFF - #endif /* not HAVE_TIFF */ - - #if HAVE_GIF - #ifndef LIBGIF - #define LIBGIF -lgif - #endif /* not defined LIBGIF */ - #else /* not HAVE_GIF */ - #define LIBGIF - #endif /* not HAVE_GIF */ - #ifdef HAVE_X11 /* LD_SWITCH_X_DEFAULT comes after everything else that specifies options for where to find X libraries, but before those libraries. */ X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT ! LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM LIB_X11_LIB LIBX11_SYSTEM $(XFT_LIBS) #else /* not HAVE_X11 */ LIBX= $(LIBXMENU) LD_SWITCH_X_SITE #endif /* not HAVE_X11 */ #endif /* not HAVE_X_WINDOWS */ - #if HAVE_GPM - #ifndef LIBGPM - #define LIBGPM -lgpm - #endif /* not defined LIBGPM */ - #else /* not HAVE_GPM */ - #define LIBGPM - #endif /* not HAVE_GPM */ - - #if HAVE_LIBRESOLV - #ifndef LIBRESOLV - #define LIBRESOLV -lresolv - #endif /* not defined LIBRESOLV */ - #else /* not HAVE_LIBRESOLV */ - #define LIBRESOLV - #endif /* not HAVE_LIBRESOLV */ - LIBSOUND= @LIBSOUND@ CFLAGS_SOUND= @CFLAGS_SOUND@ --- 351,366 ---- #endif #endif /* not USE_X_TOOLKIT */ #ifdef HAVE_X11 /* LD_SWITCH_X_DEFAULT comes after everything else that specifies options for where to find X libraries, but before those libraries. */ X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT ! LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) @LIBTIFF@ @LIBJPEG@ @LIBPNG@ @LIBGIF@ @LIBXPM@ LIB_X11_LIB LIBX11_SYSTEM @XFT_LIBS@ #else /* not HAVE_X11 */ LIBX= $(LIBXMENU) LD_SWITCH_X_SITE #endif /* not HAVE_X11 */ #endif /* not HAVE_X_WINDOWS */ LIBSOUND= @LIBSOUND@ CFLAGS_SOUND= @CFLAGS_SOUND@ *************** *** 881,887 **** with GCC, we might need gnulib again after them. */ LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \ ! LIBGPM LIBRESOLV LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \ LIBS_DEBUG $(GETLOADAVG_LIBS) \ @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \ $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR) --- 821,827 ---- with GCC, we might need gnulib again after them. */ LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \ ! @LIBGPM@ @LIBRESOLV@ LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \ LIBS_DEBUG $(GETLOADAVG_LIBS) \ @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \ $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)