1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/hotkeys.c)
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(hotkeys, 0.5.7.1)
AM_MAINTAINER_MODE
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_ARG_WITH(xml-prefix,
AC_HELP_STRING([--with-xml-prefix=PFX],
[Prefix where GNOME XML library is installed]),
xml_config_prefix="$withval", xml_config_prefix="")
AC_ARG_ENABLE(xmltest,
AC_HELP_STRING([--disable-xmltest],
[Do not try to compile and run a test XML program]),
, enable_xmltest=yes)
AC_ARG_WITH(db3-inc,
AC_HELP_STRING([--with-db3-inc=DIR],
[Set the include directory of Berkeley DB3]),
db3_incdir="$withval", db3_incdir="")
AC_ARG_WITH(db3-lib,
AC_HELP_STRING([--with-db3-lib=DIR],
[Set the library directory of Berkeley DB3]),
db3_libdir="$withval", db3_libdir="")
AC_ARG_ENABLE(db3test,
AC_HELP_STRING([--disable-db3test],
[Do not try to test for libdb3, assume it's present]),
, enable_db3test=yes)
AC_ARG_WITH(gtk,
AC_HELP_STRING([--with-gtk],
[Use GTK interface (incl. splash screen, default is NO)]),
use_gtk=yes, )
AC_ARG_WITH(xosd,
AC_HELP_STRING([--with-xosd], [Use XOSD library (default is NO)]),
use_xosd=yes, )
dnl --- Not use any more, as libxosd-dev provides its own m4
dnl AC_ARG_WITH(xosd-inc,
dnl [ --with-xosd-inc=DIR Set the include directory of XOSD],
dnl xosd_incdir="$withval", xosd_incdir="")
dnl
dnl AC_ARG_WITH(xosd-lib,
dnl [ --with-xosd-lib=DIR Set the library directory of XOSD],
dnl xosd_libdir="$withval", xosd_libdir="")
dnl-----------------------------------------------------------------------
dnl Checks for X
dnl-----------------------------------------------------------------------
AC_PATH_XTRA
if test "x$no_x" = "xyes"
then
AC_MSG_ERROR("You must have X installed")
else
X_LIBS="$X_LIBS -lX11 -lXmu"
fi
dnl-----------------------------------------------------------------------
dnl Checks for LIBXML2
dnl-----------------------------------------------------------------------
if test "x$enable_xmltest" = "xyes"; then
AM_PATH_XML2(2.2.8)
else
# AC_MSG_NOTICE([Skipping libxml2 test])
echo
fi
dnl-----------------------------------------------------------------------
dnl Checks for LIBPTHREAD
dnl-----------------------------------------------------------------------
AC_CHECK_LIB(pthread, pthread_create)
dnl Checks for libraries.
dnl Replace `main' with a function in -lX11:
dnl AC_CHECK_LIB(X11, XNextEvent)
dnl Replace `main' with a function in -lxkbfile:
dnl AC_CHECK_LIB(xkbfile, main)
dnl Replace `main' with a function in -lxml:
dnl Replace `main' with a function in -lz:
dnl AC_CHECK_LIB(z, main)
dnl AM_PATH_GTK()
dnl AM_PATH_GLIB(1.2.0, ,[AC_MSG_ERROR(Missing gthread module in GLib!)], gthread)
dnl AC_SUBST(GLIB_LIBS)
dnl AC_SUBST(GLIB_CFLAGS)
dnl-----------------------------------------------------------------------
dnl Checks for DB3
dnl-----------------------------------------------------------------------
if test "x$enable_db3test" = "xyes"; then
AM_CHECK_DB3
else
# AC_MSG_NOTICE([Skipping libdb3 test])
echo
fi
dnl-----------------------------------------------------------------------
dnl Checks for GTK+
dnl-----------------------------------------------------------------------
if test "x$use_gtk" = "xyes"; then
AM_PATH_GTK_2_0(2.0.0,
AC_DEFINE(HAVE_GTK,1,[Define if you have the gtk+ libraries.]))
fi
dnl-----------------------------------------------------------------------
dnl Checks for XOSD
dnl-----------------------------------------------------------------------
if test "x$use_xosd" = "xyes"; then
AM_PATH_LIBXOSD(AC_DEFINE(HAVE_LIBXOSD,1,[Define if you have the xosd library (-lxosd).]))
fi
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_MAJOR
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h string.h strings.h syslog.h sys/file.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_VPRINTF
AC_FUNC_CLOSEDIR_VOID
AC_CHECK_FUNCS(select strdup strerror getopt_long)
AC_OUTPUT(Makefile src/Makefile def/Makefile)
|