unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Patch to replace some cpp with autoconf
@ 2009-08-22 22:54 Glenn Morris
  2009-09-14 18:52 ` Dan Nicolaescu
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2009-08-22 22:54 UTC (permalink / raw)
  To: emacs-devel


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  <rgm@gnu.org>

	* 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 <malloc/malloc.h> 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 <malloc/malloc.h> 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}
  \f
  .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}
  \f
  .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)




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Patch to replace some cpp with autoconf
  2009-08-22 22:54 Patch to replace some cpp with autoconf Glenn Morris
@ 2009-09-14 18:52 ` Dan Nicolaescu
  2009-09-14 19:14   ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2009-09-14 18:52 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

Glenn Morris <rgm@gnu.org> writes:

  > 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  <rgm@gnu.org>
  > 
  > 	* 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.

Does this allow us to get rid using cpp for lib-src/Makefile.in? (If not
it should be very very close to it).

Any reason this has not been checked in yet?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Patch to replace some cpp with autoconf
  2009-09-14 18:52 ` Dan Nicolaescu
@ 2009-09-14 19:14   ` Glenn Morris
  2009-09-14 21:56     ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2009-09-14 19:14 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

Dan Nicolaescu wrote:

> Does this allow us to get rid using cpp for lib-src/Makefile.in? (If not
> it should be very very close to it).

Almost, but not quite, I think.

> Any reason this has not been checked in yet?

This mail from Stefan was an implicit rejection of it for Emacs 23.2,
which seems fair enough:

http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg01039.html

   So I believe we should create a new branch EMACS_23 which will play
   the role currently played by the trunk, so the trunk can now be
   open to more experimental development (bidi, cpp->autoconf
   conversion, lexbind, ...), targetted for Emacs-24.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Patch to replace some cpp with autoconf
  2009-09-14 19:14   ` Glenn Morris
@ 2009-09-14 21:56     ` Stefan Monnier
  2009-09-14 23:11       ` Dan Nicolaescu
  2009-09-15  2:44       ` Glenn Morris
  0 siblings, 2 replies; 8+ messages in thread
From: Stefan Monnier @ 2009-09-14 21:56 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Dan Nicolaescu, emacs-devel

>> Any reason this has not been checked in yet?
> This mail from Stefan was an implicit rejection of it for Emacs 23.2,
> which seems fair enough:

Well, not a rejection: I welcome this patch very warmly, just "not now".
:-(

Seeing how git.sv.gnu.org cannot provide write access via the
git-cvsserver (for various reasons), and how Eli doesn't want to use Git
to develop the Emacs-24 branch (where his bidi code would be one of the
important changes), I'm not sure how to move forward right now.
I really (really) wish we could switch to Bzr real soon now.


        Stefan




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Patch to replace some cpp with autoconf
  2009-09-14 21:56     ` Stefan Monnier
@ 2009-09-14 23:11       ` Dan Nicolaescu
  2009-09-15  1:39         ` Chong Yidong
  2009-09-15  2:44       ` Glenn Morris
  1 sibling, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2009-09-14 23:11 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

  > >> Any reason this has not been checked in yet?
  > > This mail from Stefan was an implicit rejection of it for Emacs 23.2,
  > > which seems fair enough:
  > 
  > Well, not a rejection: I welcome this patch very warmly, just "not now".
  > :-(
  > 
  > Seeing how git.sv.gnu.org cannot provide write access via the
  > git-cvsserver (for various reasons), and how Eli doesn't want to use Git
  > to develop the Emacs-24 branch (where his bidi code would be one of the
  > important changes), I'm not sure how to move forward right now.
  > I really (really) wish we could switch to Bzr real soon now.

What is the status of that switch?  What are we waiting for?




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Patch to replace some cpp with autoconf
  2009-09-14 23:11       ` Dan Nicolaescu
@ 2009-09-15  1:39         ` Chong Yidong
  2009-09-15  5:59           ` Michael Welsh Duggan
  0 siblings, 1 reply; 8+ messages in thread
From: Chong Yidong @ 2009-09-15  1:39 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: Stefan Monnier, emacs-devel

Dan Nicolaescu <dann@ics.uci.edu> writes:

> What is the status of that switch?  What are we waiting for?

We're waiting for Savannah to install bzr 1.17:

http://savannah.gnu.org/support/index.php?106951




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Patch to replace some cpp with autoconf
  2009-09-14 21:56     ` Stefan Monnier
  2009-09-14 23:11       ` Dan Nicolaescu
@ 2009-09-15  2:44       ` Glenn Morris
  1 sibling, 0 replies; 8+ messages in thread
From: Glenn Morris @ 2009-09-15  2:44 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Dan Nicolaescu, emacs-devel

Stefan Monnier wrote:

>> This mail from Stefan was an implicit rejection of it for Emacs 23.2,
>> which seems fair enough:
>
> Well, not a rejection: I welcome this patch very warmly, just "not now".
> :-(

Yeah, so, you're rejecting it for 23.2. :)

It's OK; it's commitment I'm afraid of.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Patch to replace some cpp with autoconf
  2009-09-15  1:39         ` Chong Yidong
@ 2009-09-15  5:59           ` Michael Welsh Duggan
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Welsh Duggan @ 2009-09-15  5:59 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Dan Nicolaescu, Stefan Monnier, emacs-devel

Chong Yidong <cyd@stupidchicken.com> writes:

> Dan Nicolaescu <dann@ics.uci.edu> writes:
>
>> What is the status of that switch?  What are we waiting for?
>
> We're waiting for Savannah to install bzr 1.17:
>
> http://savannah.gnu.org/support/index.php?106951

Status on that bug has been "Done" since Aug 1.

-- 
Michael Welsh Duggan
(md5i@md5i.com)




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-09-15  5:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-22 22:54 Patch to replace some cpp with autoconf Glenn Morris
2009-09-14 18:52 ` Dan Nicolaescu
2009-09-14 19:14   ` Glenn Morris
2009-09-14 21:56     ` Stefan Monnier
2009-09-14 23:11       ` Dan Nicolaescu
2009-09-15  1:39         ` Chong Yidong
2009-09-15  5:59           ` Michael Welsh Duggan
2009-09-15  2:44       ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).