diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-03-11 21:43:04 -0300 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-07-02 19:03:10 -0300 |
commit | 2f7992eaefb19f23c127e15624ba38208c03439b (patch) | |
tree | 061d365af23a69f1b942d7087bf6173cda57c57a /configure.ac | |
parent | 19e3f51f9758e2708fb4abfa364b346591089bcd (diff) |
Update build for sane defaults.
Check for existing system functions.
Don't add test program sources with main functions to libraries.
Build test programs.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index c421a79..2672a87 100644 --- a/configure.ac +++ b/configure.ac @@ -29,20 +29,38 @@ AM_MAINTAINER_MODE AM_CONFIG_HEADER(config.h) AC_PROG_CC +AM_PROG_CC_C_O AC_PROG_INSTALL AC_PROG_RANLIB +PKG_PROG_PKG_CONFIG -# Checks for pkg-config packages -XAW_CHECK_XPRINT_SUPPORT(XEDIT) -if test "x$xaw_use_xprint" = "xyes" ; then - PKG_CHECK_MODULES(XPRINT_UTIL, xprintutil xp) - - XEDIT_CFLAGS="$XEDIT_CFLAGS $XPRINT_UTIL_CFLAGS" - XEDIT_LIBS="$XEDIT_LIBS $XPRINT_UTIL_LIBS" +AC_ARG_ENABLE(xprint, + AS_HELP_STRING([--enable-xprint], + [Compile with xprint support (default: disabled)]), + [enable_xprint=$enableval], [enable_xprint=no]) +AM_CONDITIONAL(USE_XPRINT, test x$enable_xprint = xyes) +if test x$enable_xprint = xyes; then + PKG_CHECK_MODULES(PKGDEPS, xprintutil xp xaw8) +else + PKG_CHECK_MODULES(PKGDEPS, xaw7) fi -AC_SUBST(XEDIT_CFLAGS) -AC_SUBST(XEDIT_LIBS) +AC_ARG_WITH(lispdir, AS_HELP_STRING([--with-lispdir=PATH], + [Directory to install lisp files (default: $libdir/X11/xedit/lisp)]), + [ lispdir="$withval"], + [ lispdir=${libdir}/X11/xedit/lisp ]) +LISPDIR=$lispdir +AC_SUBST(LISPDIR) + +AC_CHECK_FUNC(realpath, [], [have_realpath=yes]) +AM_CONDITIONAL(NEED_REALPATH, test x$have_realpath = xyes) +AC_CHECK_FUNC(strcasecmp, [], [have_strcasecmp=yes]) +AM_CONDITIONAL(NEED_STRCASECMP, test x$have_strcasecmp = xyes) +AC_CHECK_FUNC(unsetenv, [], [have_unsetenv=yes]) +AM_CONDITIONAL(NEED_UNSETENV, test x$have_unsetenv = xyes) + +AC_SUBST(PKGDEPS_CFLAGS) +AC_SUBST(PKGDEPS_LIBS) PKG_CHECK_MODULES(APPDEFS, xt) appdefaultdir=$(pkg-config --variable=appdefaultdir xt) |