Log In
New Account
  
 
Home My Page Project Tree Code Snippets Project Openings NUTSS
 
 
Summary Tracker Lists CVS Files
 

CVS | Administration


File:  [GForge:cvsroot/nutss] / libnutss / configure.ac
Revision 1.20: download - view: text, annotated - select for diffs
Tue Jun 26 02:55:13 2007 UTC (10 years, 3 months ago) by saikat
Branches: MAIN
CVS tags: HEAD
just flushing some minor changes I've had for a while. So my .git is in sync with CVS as of now before I start hacking and slashing

#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT([nutss], [0.2.0], [saikat@cs.cornell.edu])
AC_CONFIG_SRCDIR(src/nutss.c)
AC_CONFIG_HEADER(include/config.h)

echo "Configuring libnutss $PACKAGE_VERSION:"

AM_INIT_AUTOMAKE
CFLAGS="$CFLAGS -DLINUX"

# Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL

# Checks for header files.
AC_PATH_X
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h netdb.h netinet/in.h stddef.h stdlib.h string.h strings.h sys/socket.h sys/time.h syslog.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
#AC_TYPE_SSIZE_T
#AC_TYPE_UINT16_T
#AC_TYPE_UINT32_T
#AC_TYPE_UINT64_T

# Check for required libraries
AC_SEARCH_LIBS(pthread_atfork, pthread, [], [AC_ERROR(Requires development libraries for pthreads)])
AC_SEARCH_LIBS(eXosip_default_action, eXosip2, [], [AC_ERROR(Requires development libraries for eXosip2)])
AC_SEARCH_LIBS(uuid_generate, uuid, [], [AC_ERROR(Requires development libraries for uuid)])
AC_SEARCH_LIBS(SSL_CTX_new, ssl, [], [AC_ERROR(Requires development libraries for openssl)])
AC_SEARCH_LIBS(deflateInit_, z, [], [AC_ERROR(Requires development libraries for zlib)])
AC_SEARCH_LIBS(event_add, event, [], [AC_ERROR(Requires development libraries for libevent)])

# Osip2
AC_SEARCH_LIBS(osip_message_free, osip2, [], [AC_ERROR(Requires development libraries for osip2)])
if pkg-config --atleast-version=3.0.0 libosip2; then
    AC_DEFINE(HAVE_OSIP2_3, 1, [Define to 1 if you have Osip2 API version 3.0 or higher])
fi
CFLAGS="$CFLAGS $(pkg-config --cflags libosip2)"

# Xauth
AC_SEARCH_LIBS(XSetAuthorization, X11,
    [AC_DEFINE(HAVE_XAUTH, 1, [Define to 1 if you want to enable nutssified X
     clients to connect to nutssified X servers. WARNING: Enabling this potion
     potentially circumvents X server security.])
     s_xauth=t
     ])
AM_CONDITIONAL(XAUTH, test x$s_xauth = xt)

# libxml2
AC_SEARCH_LIBS(xmlDOMWrapCloneNode, xml2, [], [AC_ERROR(Requires development libraries for libxml2 >= 2.6.27)])
AC_CHECK_HEADER(libxml/parser.h, [], [
CFLAGS="$CFLAGS $(xml2-config --cflags) -Wno-pointer-sign"
])

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([atexit dup2 gettimeofday inet_ntoa memmove memset putenv select socket strchr strdup strerror strstr strtol])

# Debugging
AC_MSG_CHECKING([if debugging should be enabled])
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [compile with debugging support]),,
	enable_debug=no)
if test "$debug_enabled" != "no"; then
	CFLAGS="${CFLAGS/O2/O0} -g -DDEBUG"
fi
AM_CONDITIONAL(DEBUG, test "$enable_debug" != "no")
AC_MSG_RESULT($enable_debug)

# Recursive configure and generate files
NUTSS_SRCDIR=$top_srcdir
AC_CONFIG_SUBDIRS([dante])

# Doxygen
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_MAN_FEATURE(ON)
DX_RTF_FEATURE(OFF)
DX_XML_FEATURE(OFF)
DX_PDF_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN(nutss, doxygen.cfg, doc/doxygen)

# JAVA
AC_ARG_ENABLE(java, AC_HELP_STRING([--enable-java], [enable Java API]),,
        enable_java=no)
if test "$enable_java" != "no"; then
    JAVACFLAGS="$JAVACFLAGS -source 1.5"
    AC_SUBST(JAVACFLAGS)
    AC_PROG_JAVAC
    AC_PROG_JAR
    AM_MISSING_PROG(GJDOC, gjdoc, $missing_dir)
    CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
    AC_CHECK_HEADERS([jni.h], [], [AC_MSG_ERROR(jni.h not found. Set JAVA_HOME to your JDK location.)])
    AC_DEFINE(HAVE_JAVA, 1, [Define to 1 to enable JNI support, which allows
                             Java programs to use libnutss])
fi
AM_CONDITIONAL(JAVA, test "$enable_java" != "no")
AC_MSG_CHECKING([if Java implementation should be built])
AC_MSG_RESULT($enable_java)

# Generate output
AC_OUTPUT([Makefile src/Makefile src/java/Makefile src/java/net/Makefile
           src/java/net/nutss/Makefile include/Makefile patches/Makefile
           examples/Makefile examples/java/Makefile doc/Makefile lib/Makefile
           scripts/Makefile VERSION nutss.spec libnutss.pc scripts/nutssify],
           [chmod +x scripts/nutssify])

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
 

GForge.cis.cornell.edu is brought to you by

Cornell Computing and Information Science


Powered By GForge Collaborative Development Environment