2010-02-11 16:01:00 +00:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
AC_PREREQ([2.63])
|
2010-02-17 17:48:02 +00:00
|
|
|
AC_INIT([mISDNuser], [2.0.2], [i4ldeveloper@isdn4linux.de])
|
2010-02-11 16:01:00 +00:00
|
|
|
AC_CONFIG_SRCDIR([tools/])
|
|
|
|
AC_CONFIG_HEADERS([include/config.h])
|
2011-04-25 02:38:12 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2010-02-11 16:01:00 +00:00
|
|
|
|
2011-04-25 02:38:16 +00:00
|
|
|
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
|
2010-02-11 16:01:00 +00:00
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
2011-04-25 02:38:18 +00:00
|
|
|
AC_PROG_CXX
|
2010-02-11 16:01:00 +00:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
AC_CHECK_LIB([pthread], [pthread_create])
|
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
|
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_HEADER_STDBOOL
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_TYPE_INT16_T
|
|
|
|
AC_TYPE_INT32_T
|
|
|
|
AC_TYPE_INT64_T
|
|
|
|
AC_TYPE_PID_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
|
|
|
LT_INIT
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([example],
|
|
|
|
[ --enable-example Include example programs],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) example=true ;;
|
|
|
|
no) example=false ;;
|
|
|
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-example]) ;;
|
|
|
|
esac],
|
|
|
|
[example=false])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([OPT_EXAMPLE], [test "x$example" = xtrue])
|
|
|
|
|
2010-02-14 17:41:18 +00:00
|
|
|
AC_ARG_ENABLE([gui],
|
|
|
|
[ --enable-gui Include GUI programs],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) gui=true ;;
|
|
|
|
no) gui=false ;;
|
|
|
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-example]) ;;
|
|
|
|
esac],
|
|
|
|
[gui=false])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([OPT_GUI], [test "x$gui" = xtrue])
|
|
|
|
|
|
|
|
if $gui
|
|
|
|
then
|
2010-02-15 17:45:10 +00:00
|
|
|
AC_CHECK_LIB(QtCore, [qt_addObject],
|
|
|
|
AC_MSG_RESULT(found),
|
|
|
|
AC_MSG_ERROR([Qt library not found])
|
|
|
|
)
|
2010-02-14 17:41:18 +00:00
|
|
|
AC_ARG_VAR(QMAKE, [QT make helper])
|
|
|
|
AC_CHECK_TOOL(QMAKE, qmake,[NotFound],)
|
|
|
|
if test x$QMAKE = xNotFound
|
|
|
|
then
|
|
|
|
AC_MSG_ERROR([qmake not found])
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-07-14 09:19:38 +00:00
|
|
|
AC_ARG_ENABLE([memleak_debug],
|
|
|
|
[ --enable-memleak_debug Turn on debugging of memleaks],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) memleak_debug=true ;;
|
|
|
|
no) memleak_debug=false ;;
|
|
|
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-memleak_debug]) ;;
|
|
|
|
esac],
|
|
|
|
[debug=false])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([MEMLEAKDEBUG], [test x$memleak_debug = xtrue])
|
|
|
|
if test x$memleak_debug = xtrue ; then
|
|
|
|
MEMLEAKDEBUG_COMPILE=1
|
|
|
|
else
|
|
|
|
MEMLEAKDEBUG_COMPILE=0
|
|
|
|
fi
|
|
|
|
AC_SUBST(MEMLEAKDEBUG_COMPILE)
|
|
|
|
|
2011-10-20 16:34:37 +00:00
|
|
|
AC_ARG_ENABLE([capi],
|
|
|
|
[ --enable-capi Include CAPI2.0 support],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) capi=true ;;
|
|
|
|
no) capi=false ;;
|
|
|
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-capi]) ;;
|
|
|
|
esac],
|
|
|
|
[capi=false])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([OPT_CAPI], [test "x$capi" = xtrue])
|
|
|
|
|
|
|
|
if $capi
|
|
|
|
then
|
|
|
|
AC_CHECK_LIB(capi20, [capi20_isinstalled],
|
2011-10-28 10:58:42 +00:00
|
|
|
AC_MSG_RESULT([capi20 found]),
|
2011-10-20 16:34:37 +00:00
|
|
|
AC_MSG_ERROR([capi library not found])
|
|
|
|
)
|
2011-10-28 10:58:42 +00:00
|
|
|
AC_CHECK_HEADER([capi20.h],
|
|
|
|
AC_CHECK_HEADER([capi_mod.h],
|
|
|
|
[AC_MSG_RESULT([capi_mod.h found])],
|
|
|
|
AC_MSG_ERROR([capi_mod.h do not exist - update capi4linux]),
|
|
|
|
),
|
|
|
|
AC_MSG_ERROR([capi20.h do not exist - install capi4linux development files]),
|
|
|
|
)
|
|
|
|
AC_COMPUTE_INT([CAPI_MODULE_LOADER_VERSION], [[MODULE_LOADER_VERSION]],
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <capi_mod.h>
|
|
|
|
],
|
|
|
|
[AC_MSG_ERROR([capi library MODULE_LOADER_VERSION cannot calculated - update capi4linux])]
|
|
|
|
)
|
|
|
|
AC_MSG_RESULT([Capi library module loader version ${CAPI_MODULE_LOADER_VERSION} detected])
|
|
|
|
AC_SUBST(CAPI_MODULE_LOADER_VERSION)
|
2011-10-20 16:34:37 +00:00
|
|
|
fi
|
|
|
|
|
2010-02-11 16:01:00 +00:00
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_FORK
|
|
|
|
AC_FUNC_MALLOC
|
|
|
|
AC_CHECK_FUNCS([gethostbyname gettimeofday inet_ntoa memset select socket strcasecmp strchr strdup strerror strstr strtol])
|
|
|
|
|
2010-02-17 17:35:11 +00:00
|
|
|
# special checks
|
|
|
|
MISDN_CHECK_AF_ISDN
|
|
|
|
|
|
|
|
|
2011-06-15 08:32:53 +00:00
|
|
|
if test -d .git/objects
|
|
|
|
then
|
|
|
|
git_repo=true
|
|
|
|
else
|
|
|
|
git_repo=false
|
|
|
|
fi
|
2010-02-14 18:54:50 +00:00
|
|
|
|
|
|
|
AM_CONDITIONAL([GIT_REPO], [test "x$git_repo" = xtrue])
|
|
|
|
|
2010-02-11 16:01:00 +00:00
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
include/Makefile
|
2010-02-17 17:35:11 +00:00
|
|
|
include/mISDN/mISDNcompat.h
|
2010-02-11 16:01:00 +00:00
|
|
|
lib/Makefile
|
|
|
|
bridge/Makefile
|
2010-02-11 20:02:13 +00:00
|
|
|
l1oip/Makefile
|
2010-02-11 16:01:00 +00:00
|
|
|
tools/Makefile
|
|
|
|
example/Makefile
|
2010-02-14 17:41:18 +00:00
|
|
|
guitools/Makefile
|
|
|
|
guitools/qmisdnwatch/Makefile
|
2011-10-20 16:34:37 +00:00
|
|
|
capi20/Makefile
|
|
|
|
capi20/module/Makefile
|
2010-02-11 16:01:00 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_OUTPUT
|