2003-09-13 22:34:30 +02:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
2016-04-25 18:00:57 +02:00
|
|
|
AC_INIT(mbusd, 0.2.3)
|
2016-04-25 18:45:26 +02:00
|
|
|
AM_INIT_AUTOMAKE([foreign])
|
2003-09-13 22:34:30 +02:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
AC_ISC_POSIX
|
|
|
|
AC_PROG_CC
|
|
|
|
AM_PROG_CC_STDC
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
2013-11-18 09:57:00 +01:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
|
2003-09-13 22:34:30 +02:00
|
|
|
dnl Checks for programs.
|
|
|
|
dnl Checks for libraries.
|
|
|
|
dnl Checks for header files.
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_CHECK_LIB(util, uu_lock, ,
|
2015-02-25 11:33:57 +01:00
|
|
|
AC_MSG_WARN("Function uu_lock() is not found in libutil. UUCP locking switched off!"))
|
2003-09-13 22:34:30 +02:00
|
|
|
dnl Checks for Additional stuffs.
|
2003-09-27 14:57:37 +02:00
|
|
|
AC_CHECK_FUNCS(daemon)
|
|
|
|
AC_CHECK_FUNCS(cfsetspeed, ,
|
|
|
|
[AC_CHECK_FUNCS(cfsetispeed, ,
|
2015-02-25 11:33:57 +01:00
|
|
|
[AC_MSG_ERROR("Both cfsetspeed() and cfsetispeed() functions not found!")])])
|
2013-11-18 09:57:00 +01:00
|
|
|
AC_CHECK_FUNCS(cfmakeraw)
|
2003-09-13 22:34:30 +02:00
|
|
|
|
|
|
|
dnl Set PACKAGE SOURCE DIR in config.h.
|
|
|
|
packagesrcdir=`cd $srcdir && pwd`
|
|
|
|
|
|
|
|
dnl Set PACKAGE PREFIX
|
|
|
|
if test "x${prefix}" = "xNONE"; then
|
|
|
|
packageprefix=${ac_default_prefix}
|
|
|
|
else
|
|
|
|
packageprefix=${prefix}
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Set PACKAGE DATA & DOC DIR
|
|
|
|
packagedatadir=share/${PACKAGE}
|
|
|
|
packagedocdir=doc/${PACKAGE}
|
|
|
|
|
|
|
|
dnl Set PACKAGE DIRS in config.h.
|
|
|
|
packagepixmapsdir=${packagedatadir}/pixmaps
|
|
|
|
packagehelpdir=${packagedatadir}/help
|
|
|
|
packagemenudir=${packagedatadir}
|
|
|
|
|
|
|
|
dnl Subst PACKAGE_DATA_DIR.
|
|
|
|
NO_PREFIX_PACKAGE_DATA_DIR="${packagedatadir}"
|
|
|
|
AC_SUBST(NO_PREFIX_PACKAGE_DATA_DIR)
|
|
|
|
PACKAGE_DATA_DIR="${packageprefix}/${packagedatadir}"
|
|
|
|
AC_SUBST(PACKAGE_DATA_DIR)
|
|
|
|
|
|
|
|
dnl Subst PACKAGE_DOC_DIR.
|
|
|
|
NO_PREFIX_PACKAGE_DOC_DIR="${packagedocdir}"
|
|
|
|
AC_SUBST(NO_PREFIX_PACKAGE_DOC_DIR)
|
|
|
|
PACKAGE_DOC_DIR="${packageprefix}/${packagedocdir}"
|
|
|
|
AC_SUBST(PACKAGE_DOC_DIR)
|
|
|
|
|
|
|
|
dnl Subst PACKAGE_PIXMAPS_DIR.
|
|
|
|
NO_PREFIX_PACKAGE_PIXMAPS_DIR="${packagepixmapsdir}"
|
|
|
|
AC_SUBST(NO_PREFIX_PACKAGE_PIXMAPS_DIR)
|
|
|
|
PACKAGE_PIXMAPS_DIR="${packageprefix}/${packagepixmapsdir}"
|
|
|
|
AC_SUBST(PACKAGE_PIXMAPS_DIR)
|
|
|
|
|
|
|
|
dnl Subst PACKAGE_HELP_DIR.
|
|
|
|
NO_PREFIX_PACKAGE_HELP_DIR="${packagehelpdir}"
|
|
|
|
AC_SUBST(NO_PREFIX_PACKAGE_HELP_DIR)
|
|
|
|
PACKAGE_HELP_DIR="${packageprefix}/${packagehelpdir}"
|
|
|
|
AC_SUBST(PACKAGE_HELP_DIR)
|
|
|
|
|
|
|
|
dnl Subst PACKAGE_MENU_DIR.
|
|
|
|
NO_PREFIX_PACKAGE_MENU_DIR="${packagemenudir}"
|
|
|
|
AC_SUBST(NO_PREFIX_PACKAGE_MENU_DIR)
|
|
|
|
PACKAGE_MENU_DIR="${packageprefix}/${packagemenudir}"
|
|
|
|
AC_SUBST(PACKAGE_MENU_DIR)
|
|
|
|
|
2013-11-18 09:57:00 +01:00
|
|
|
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${packageprefix}/${packagedatadir}", "")
|
|
|
|
AC_DEFINE_UNQUOTED(PACKAGE_DOC_DIR, "${packageprefix}/${packagedocdir}", "")
|
|
|
|
AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${packageprefix}/${packagepixmapsdir}", "")
|
|
|
|
AC_DEFINE_UNQUOTED(PACKAGE_HELP_DIR, "${packageprefix}/${packagehelpdir}", "")
|
|
|
|
AC_DEFINE_UNQUOTED(PACKAGE_MENU_DIR, "${packageprefix}/${packagemenudir}", "")
|
|
|
|
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", "")
|
2003-09-13 22:34:30 +02:00
|
|
|
|
2015-02-25 11:33:57 +01:00
|
|
|
AC_ARG_ENABLE([trxctl],
|
|
|
|
AS_HELP_STRING([--disable-trxctl], [Disable RS-232 to RS-485 converter data direction control support]))
|
|
|
|
|
|
|
|
AS_IF([test "x$enable_trxctl" != "xno"], [
|
|
|
|
AC_DEFINE([TRXCTL], "", "")
|
|
|
|
])
|
|
|
|
|
2003-09-13 22:34:30 +02:00
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
|
|
|
src/Makefile
|
|
|
|
doc/Makefile
|
2003-09-27 14:57:37 +02:00
|
|
|
doc/mbusd.8
|
2003-09-13 22:34:30 +02:00
|
|
|
])
|
|
|
|
|