comparison configure.in @ 108019:b235d39e4457

Remove some more cpp in favor of autoconf. * configure.in (LIBSELINUX_LIBS): Always substitute in Makefiles. (GTK_OBJ, DBUS_OBJ, LIBXSM, XMENU_OBJ, XOBJ): New output variables. * src/Makefile.in (DBUS_OBJ, GTK_OBJ, XMENU_OBJ, XOBJ): Define using autoconf, not cpp. (LIBXSM): New variable, set by autoconf. (LIBXT): Use $LIBXSM.
author Glenn Morris <rgm@gnu.org>
date Tue, 20 Apr 2010 23:35:35 -0700
parents c85d877f94f1
children 1c3b0c4f71d9
comparison
equal deleted inserted replaced
108018:a60efd79d8af 108019:b235d39e4457
1610 AC_MSG_ERROR($GTK_PKG_ERRORS) 1610 AC_MSG_ERROR($GTK_PKG_ERRORS)
1611 fi 1611 fi
1612 fi 1612 fi
1613 1613
1614 1614
1615 GTK_OBJ=
1615 if test x"$pkg_check_gtk" = xyes; then 1616 if test x"$pkg_check_gtk" = xyes; then
1616 1617
1617 AC_SUBST(GTK_CFLAGS) 1618 AC_SUBST(GTK_CFLAGS)
1618 AC_SUBST(GTK_LIBS) 1619 AC_SUBST(GTK_LIBS)
1619 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" 1620 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
1627 AC_MSG_ERROR([Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?]); 1628 AC_MSG_ERROR([Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?]);
1628 fi 1629 fi
1629 else 1630 else
1630 HAVE_GTK=yes 1631 HAVE_GTK=yes
1631 AC_DEFINE(USE_GTK, 1, [Define to 1 if using GTK.]) 1632 AC_DEFINE(USE_GTK, 1, [Define to 1 if using GTK.])
1633 GTK_OBJ=gtkutil.o
1632 USE_X_TOOLKIT=none 1634 USE_X_TOOLKIT=none
1633 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then 1635 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
1634 : 1636 :
1635 else 1637 else
1636 AC_MSG_WARN([[Your version of Gtk+ will have problems with 1638 AC_MSG_WARN([[Your version of Gtk+ will have problems with
1640 sleep 3 1642 sleep 3
1641 fi 1643 fi
1642 fi 1644 fi
1643 1645
1644 fi 1646 fi
1647 AC_SUBST(GTK_OBJ)
1645 1648
1646 1649
1647 if test "${HAVE_GTK}" = "yes"; then 1650 if test "${HAVE_GTK}" = "yes"; then
1648 1651
1649 dnl GTK scrollbars resemble toolkit scrollbars a lot, so to avoid 1652 dnl GTK scrollbars resemble toolkit scrollbars a lot, so to avoid
1711 1714
1712 dnl D-Bus has been tested under GNU/Linux only. Must be adapted for 1715 dnl D-Bus has been tested under GNU/Linux only. Must be adapted for
1713 dnl other platforms. Support for higher D-Bus versions than 1.0 is 1716 dnl other platforms. Support for higher D-Bus versions than 1.0 is
1714 dnl also not configured. 1717 dnl also not configured.
1715 HAVE_DBUS=no 1718 HAVE_DBUS=no
1719 DBUS_OBJ=
1716 if test "${with_dbus}" = "yes"; then 1720 if test "${with_dbus}" = "yes"; then
1717 PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, HAVE_DBUS=yes, HAVE_DBUS=no) 1721 PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, HAVE_DBUS=yes, HAVE_DBUS=no)
1718 if test "$HAVE_DBUS" = yes; then 1722 if test "$HAVE_DBUS" = yes; then
1719 LIBS="$LIBS $DBUS_LIBS" 1723 LIBS="$LIBS $DBUS_LIBS"
1720 AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if using D-Bus.]) 1724 AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if using D-Bus.])
1721 AC_CHECK_FUNCS([dbus_watch_get_unix_fd]) 1725 AC_CHECK_FUNCS([dbus_watch_get_unix_fd])
1726 DBUS_OBJ=dbusbind.o
1722 fi 1727 fi
1723 fi 1728 fi
1729 AC_SUBST(DBUS_OBJ)
1724 1730
1725 dnl GConf has been tested under GNU/Linux only. 1731 dnl GConf has been tested under GNU/Linux only.
1726 dnl The version is really arbitrary, it is about the same age as Gtk+ 2.6. 1732 dnl The version is really arbitrary, it is about the same age as Gtk+ 2.6.
1727 HAVE_GCONF=no 1733 HAVE_GCONF=no
1728 if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then 1734 if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
2241 fi 2247 fi
2242 2248
2243 2249
2244 ### Use session management (-lSM -lICE) if available 2250 ### Use session management (-lSM -lICE) if available
2245 HAVE_X_SM=no 2251 HAVE_X_SM=no
2252 LIBXSM=
2246 if test "${HAVE_X11}" = "yes"; then 2253 if test "${HAVE_X11}" = "yes"; then
2247 AC_CHECK_HEADER(X11/SM/SMlib.h, 2254 AC_CHECK_HEADER(X11/SM/SMlib.h,
2248 [AC_CHECK_LIB(SM, SmcOpenConnection, HAVE_X_SM=yes, , -lICE)]) 2255 [AC_CHECK_LIB(SM, SmcOpenConnection, HAVE_X_SM=yes, , -lICE)])
2249 2256
2250 if test "${HAVE_X_SM}" = "yes"; then 2257 if test "${HAVE_X_SM}" = "yes"; then
2251 AC_DEFINE(HAVE_X_SM, 1, [Define to 1 if you have the SM library (-lSM).]) 2258 AC_DEFINE(HAVE_X_SM, 1, [Define to 1 if you have the SM library (-lSM).])
2259 LIBXSM="-lSM -lICE"
2252 case "$LIBS" in 2260 case "$LIBS" in
2253 *-lSM*) ;; 2261 *-lSM*) ;;
2254 *) LIBS="-lSM -lICE $LIBS" ;; 2262 *) LIBS="$LIBXSM $LIBS" ;;
2255 esac 2263 esac
2256 fi 2264 fi
2257 fi 2265 fi
2266 AC_SUBST(LIBXSM)
2258 2267
2259 # If netdb.h doesn't declare h_errno, we must declare it by hand. 2268 # If netdb.h doesn't declare h_errno, we must declare it by hand.
2260 AC_CACHE_CHECK(whether netdb declares h_errno, 2269 AC_CACHE_CHECK(whether netdb declares h_errno,
2261 emacs_cv_netdb_declares_h_errno, 2270 emacs_cv_netdb_declares_h_errno,
2262 [AC_TRY_LINK([#include <netdb.h>], 2271 [AC_TRY_LINK([#include <netdb.h>],
2760 that your compiler can find on its own, you might want to add 2769 that your compiler can find on its own, you might want to add
2761 "-I/..." or something similar.]) 2770 "-I/..." or something similar.])
2762 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC}, 2771 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC},
2763 [Define to the unexec source file name.]) 2772 [Define to the unexec source file name.])
2764 2773
2774 XMENU_OBJ=
2775 XOBJ=
2765 if test "${HAVE_X_WINDOWS}" = "yes" ; then 2776 if test "${HAVE_X_WINDOWS}" = "yes" ; then
2766 AC_DEFINE(HAVE_X_WINDOWS, 1, 2777 AC_DEFINE(HAVE_X_WINDOWS, 1,
2767 [Define to 1 if you want to use the X window system.]) 2778 [Define to 1 if you want to use the X window system.])
2768 fi 2779 XMENU_OBJ=xmenu.o
2780 XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
2781 fi
2782 AC_SUBST(XMENU_OBJ)
2783 AC_SUBST(XOBJ)
2784
2769 if test "${USE_X_TOOLKIT}" != "none" ; then 2785 if test "${USE_X_TOOLKIT}" != "none" ; then
2770 AC_DEFINE(USE_X_TOOLKIT, 1, [Define to 1 if using an X toolkit.]) 2786 AC_DEFINE(USE_X_TOOLKIT, 1, [Define to 1 if using an X toolkit.])
2771 if test "${USE_X_TOOLKIT}" = "LUCID"; then 2787 if test "${USE_X_TOOLKIT}" = "LUCID"; then
2772 AC_DEFINE(USE_LUCID, 1, [Define to 1 if using the Lucid X toolkit.]) 2788 AC_DEFINE(USE_LUCID, 1, [Define to 1 if using the Lucid X toolkit.])
2773 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then 2789 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then