Commit c7184cc9 authored by Pekka Pessi's avatar Pekka Pessi

Updated configure macros

Split custom configure macros so they work with newer autoconf/automake.
parent 3d91a15f
......@@ -26,27 +26,29 @@ AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_REV, [0])
AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_AGE, [0])
AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_SOVER, [3]) # CUR-AGE
# dnl calls AC_CANONICAL_ macros that are required by AM_INIT_AUTOMAKE
## calls AC_CANONICAL_ macros that are required by AM_INIT_AUTOMAKE
SAC_CANONICAL_SYSTEM_CACHE_CHECK
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
AC_CONFIG_HEADERS([config.h])
AC_GNU_SOURCE
### checks for programs
### -------------------
AC_LANG([C])
AC_CHECK_COMPILATION_ENVIRONMENT
SAC_TOOL_CC
AC_GNU_SOURCE
AC_PROG_INSTALL
AC_PROG_CPP
AC_CHECK_PROG(ETAGS, etags, etags, echo)
AC_CHECK_TOOL(AR, ar, ar)
AC_CHECK_TOOL(LD, ld, ld)
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
SAC_CFLAGS
SAC_CHECK_COMPILATION_ENVIRONMENT
SAC_COVERAGE
SAC_ENABLE_NDEBUG
SAC_ENABLE_EXPENSIVE_CHECKS
......@@ -82,6 +84,9 @@ AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compile
AX_COMPILER_VENDOR
### checks for libraries
### --------------------
# Enable 64 bit build
AC_ARG_ENABLE(64,
[AC_HELP_STRING([--enable-64],[build with 64 bit support])],[enable_64="$enable_64"],[enable_64="no"])
......@@ -94,9 +99,6 @@ if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
fi
fi
### checks for libraries
### --------------------
SAC_SOFIA_SU
SAC_OPENSSL
SAC_TPORT
......
......@@ -103,28 +103,32 @@ if test -z "$CC"; then
fi
AC_PROG_CC
])
dnl ======================================================================
dnl Define extra C flags for Sofia
dnl ======================================================================
AC_DEFUN([SAC_CFLAGS],[
#
# Wall
#
AC_CACHE_CHECK([for maximum warnings compiler flag],
ac_cv_cwflag,
sac_cv_cwflag,
[case "${CC-cc}" in
*gcc*) ac_cv_cwflag=-Wall;;
*gcc*) ssac_cv_cwflag=-Wall;;
*) case "$host" in
*irix*) ac_cv_cwflag=-fullwarn ;;
*solaris*) ac_cv_cwflag="-erroff=%none,E_END_OF_LOOP_CODE_NOT_REACHED,E_BAD_PTR_INT_COMBINATION -errtags"
*irix*) sac_cv_cwflag=-fullwarn ;;
*solaris*) sac_cv_cwflag="-erroff=%none,E_END_OF_LOOP_CODE_NOT_REACHED,E_BAD_PTR_INT_COMBINATION -errtags"
;;
*) ac_cv_cwflag=;;
*) sac_cv_cwflag=;;
esac
;;
esac])
AC_SUBST([CWFLAG], [$ac_cv_cwflag])
AC_SUBST([CWFLAG], [$sac_cv_cwflag])
AC_ARG_VAR([SOFIA_CFLAGS], [CFLAGS not used during configure])
AC_ARG_VAR([SOFIA_GLIB_CFLAGS], [Extra CFLAGS for libsofia-sip-ua-glib])
SAC_COVERAGE
])
dnl ======================================================================
......@@ -348,17 +352,17 @@ dnl ======================================================================
dnl Check if we are using Windows with MinGW compiler
dnl ======================================================================
AC_DEFUN([AC_CHECK_COMPILATION_ENVIRONMENT], [
AC_DEFUN([SAC_CHECK_COMPILATION_ENVIRONMENT], [
AC_REQUIRE([AC_PROG_CC])
AC_CACHE_CHECK([for compilation environment],
ac_cc_environment, [
sac_cv_cc_environment, [
machine=`$CC -dumpmachine`
if test "$machine" = mingw32 ; then
ac_cc_environment=$machine
sac_cv_cc_environment=$machine
fi
])
if test "$ac_cc_environment" = mingw32 ; then
if test "$sac_cv_cc_environment" = mingw32 ; then
CFLAGS="$CFLAGS -I\$(top_srcdir)/win32/pthread -DWINVER=0x0501 \
-D_WIN32_WINNT=0x0501 -DIN_LIBSOFIA_SIP_UA -DIN_LIBSOFIA_SRES \
-mms-bitfields \
......@@ -371,7 +375,7 @@ AC_SUBST(MINGW_ENVIRONMENT)
AC_DEFINE([HAVE_MINGW], [1], [Define to 1 if you are compiling in MinGW environment])
AC_DEFINE([HAVE_WIN32], [1], [Define to 1 if you have WIN32])
fi
AM_CONDITIONAL([HAVE_MINGW32], [test "x$ac_cc_environment" != x])
AM_CONDITIONAL([HAVE_MINGW32], [test "x$sac_cv_cc_environment" != x])
])dnl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment