ossp-pkg/sio/configure.ac
dnl ##
dnl ## OSSP sio - Stream I/O
dnl ## Copyright (c) 2002-2005 Cable & Wireless <http://www.cw.com/>
dnl ## Copyright (c) 2002-2005 The OSSP Project <http://www.ossp.org/>
dnl ## Copyright (c) 2002-2005 Ralf S. Engelschall <rse@engelschall.com>
dnl ##
dnl ## This file is part of OSSP sio, a layered stream I/O library
dnl ## which can be found at http://www.ossp.org/pkg/lib/sio/.
dnl ##
dnl ## Permission to use, copy, modify, and distribute this software for
dnl ## any purpose with or without fee is hereby granted, provided that
dnl ## the above copyright notice and this permission notice appear in all
dnl ## copies.
dnl ##
dnl ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
dnl ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
dnl ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
dnl ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
dnl ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
dnl ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
dnl ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
dnl ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
dnl ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
dnl ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
dnl ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
dnl ## SUCH DAMAGE.
dnl ##
dnl ## configure.ac: GNU Autoconf source script
dnl ##
AC_PREREQ(2.54)
AC_INIT
SIO_VERSION_STR=`./shtool version -l txt -d long VERSION`
./shtool echo -e "Configuring %BOSSP sio%b (Stream I/O), version %B${SIO_VERSION_STR}%b"
AC_SUBST(SIO_VERSION_STR)
AC_PROG_MAKE_SET
AC_PROG_CC
AC_CHECK_DEBUGGING
AC_CHECK_VA_COPY
sinclude(libtool.m4)
AC_PROG_LIBTOOL
dnl ## local checks go here
sinclude(sio.ac)
SIO_CHECK_ALL
AC_CHECK_EXTLIB([OSSP ex], ex, __ex_ctx, ex.h,
[AC_DEFINE(WITH_EX, 1, [Define to 1 if building with OSSP ex])])
dnl # pre-processing for subdirs
LIB_DEPS=""
dnl # check for OSSP al library
AC_CHECK_EXTLIB([OSSP al],
al, al_error, al.h,
[SUBDIR_AL=""],
[SUBDIR_AL="lib_al"
CPPFLAGS="$CPPFLAGS -Ilib_al"
CFLAGS="$CFLAGS -Ilib_al"
LIB_DEPS="$LIB_DEPS lib_al/*.lo"])
AC_SUBST(SUBDIR_AL)
dnl # check for OSSP sa library
AC_CHECK_EXTLIB([OSSP sa],
sa, sa_error, sa.h,
[SUBDIR_SA=""],
[SUBDIR_SA="lib_sa"
CPPFLAGS="$CPPFLAGS -Ilib_sa"
CFLAGS="$CFLAGS -Ilib_sa"
LIB_DEPS="$LIB_DEPS lib_sa/*.lo"])
AC_SUBST(SUBDIR_SA)
dnl # post-processing for subdirs
AC_SUBST(LIB_DEPS)
AC_CONFIG_SUBDIRS([$SUBDIR_AL $SUBDIR_SA])
dnl # output generation
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES([Makefile sio-config])
AC_CONFIG_COMMANDS([adjustment], [chmod a+x sio-config])
AC_OUTPUT