Commit f7dcec22 authored by Pekka Pessi's avatar Pekka Pessi

Added --without-glib option, added SU_HAVE_GLIB in su_configure.h.

darcs-hash:20051007181622-65a35-6b51739758e7c2aab494f667bd6748c6b562ade3.gz
parent 71ddf2f2
......@@ -44,11 +44,6 @@ AC_SUBST([m4dir])
### --------------------
AC_CHECK_LIB(pthread, pthread_create)
PKG_CHECK_MODULES(GLIB, glib-2.0)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_VERSION)
SAC_GNU_SOURCE
SAC_SOFIA_SU
SAC_OPENSSL
......
......@@ -36,8 +36,10 @@ TESTS = su_torture torture_su_port \
# ----------------------------------------------------------------------
# Rules for building the targets
if HAVE_GLIB
GHEADERS = su_source.h
GSOURCES = su_source.c
endif
BUILT_SOURCES = su_tag_ref.c
......
......@@ -55,6 +55,8 @@
#undef SU_HAVE_POLL
/** Define as 1 if you have IPv6 structures, macros and constants */
#undef SU_HAVE_IN6
/** Define as 1 if you have >= glib-2.0 */
#undef SU_HAVE_GLIB
/** Define as 1 if you have sa_len field in struct sockaddr */
#undef SU_HAVE_SOCKADDR_SA_LEN
......
......@@ -16,7 +16,7 @@ AC_REQUIRE([SAC_WITH_RT])
# ======================================================================
# Check for features used by su
# Define compilation options for su_configure.h
dnl Define compilation options for su_configure.h
SAC_SU_DEFINE([SU_HAVE_BSDSOCK], 1, [Define as 1 if you have BSD socket interface])
case "$target" in
......@@ -152,8 +152,29 @@ AC_EGREP_CPP(yes, [
AC_DEFINE(HAVE_IFNUM, 1, [Define this as 1 if you have SIOCGIFNUM ioctl])],
[HAVE_IFNUM=0; AC_MSG_RESULT(no)])
# ===========================================================================
# Checks for libraries
# ===========================================================================
SAC_CHECK_SU_LIBS
AC_ARG_WITH(glib,
[ --with-glib=version use GLib (default=2.0)], [
case "$with_glib" in
yes | "" ) with_glib=2.0 ;;
esac
], [with_glib=2.0])
PKG_CHECK_MODULES(GLIB, glib-$with_glib, [dnl
SAC_SU_DEFINE([SU_HAVE_GLIB], 1, [Define as 1 if you have >= glib-2.0])
HAVE_GLIB=yes
])
AM_CONDITIONAL([HAVE_GLIB], [test "x$HAVE_GLIB" != x])
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_VERSION)
# ===========================================================================
# Checks for library functions.
# ===========================================================================
......
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