syndilights/blinkentools-2.9/configure.in

115 lines
2.4 KiB
Plaintext

AC_INIT(src/b2b.c)
PACKAGE=blinkentools
VERSION=2.9
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
AC_PROG_CC
AC_PROG_LN_S
AM_PROG_CC_STDC
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
changequote([,])dnl
AC_ARG_ENABLE(oldtools,
[ --enable-oldtools build old-fashioned and obsoleted tools])
AM_CONDITIONAL(ENABLE_OLDTOOLS, test "x$enable_oldtools" = "xyes")
# Check for getopt_long
AC_CHECK_HEADER(getopt.h,
[AC_CHECK_FUNC(getopt_long,
have_getopt_long=yes
AC_DEFINE(HAVE_GETOPT_LONG, 1,
[Define to 1 if your libc has support for getopt_long().]))])
if test x$have_getopt_long != xyes; then
AC_MSG_WARN([
*** Looks as if your libc doesn't have support for getopt_long(). ***
*** Long command-line options starting with two dashes won't work. ***
])
fi
# Check for blib
PKG_CHECK_MODULES(BLIB, blib >= 1.1.7)
BLIB_VERSION=`$PKG_CONFIG --modversion blib`
# Check for blib-aa
PKG_CHECK_MODULES(AA, blib-aa = $BLIB_VERSION,
have_aa=yes, have_aa=no)
AM_CONDITIONAL(HAVE_AA, test $have_aa = "yes")
# Check for blib-pixbuf
PKG_CHECK_MODULES(PIXBUF, blib-pixbuf = $BLIB_VERSION,
have_pixbuf=yes, have_pixbuf=no)
AM_CONDITIONAL(HAVE_PIXBUF, test $have_pixbuf = "yes")
# Check for libmng
AC_ARG_WITH(libmng, [ --without-libmng don't build apps that need libmng (b2mng)])
have_mng=no
if test x$with_libmng != xno && test -z "$LIBMNG"; then
AC_CHECK_LIB(mng, mng_create,
[AC_CHECK_HEADER(libmng.h,
have_mng=yes,
[AC_MSG_WARN(*** b2mng will not be built (MNG header not found) ***)])],
[AC_MSG_WARN(*** b2mng will not be built (MNG library not found) ***)],
-lz -lm)
AC_MSG_RESULT($have_mng)
if test "$have_mng" = yes; then
LIBMNG="-lmng -lz"
fi
fi
AC_SUBST(LIBMNG)
AM_CONDITIONAL(HAVE_LIBMNG, test "$have_mng" = yes)
AC_SUBST(PACAKGE)
AC_SUBST(VERSION)
AC_OUTPUT([
Makefile
doc/Makefile
doc/b2b.1
doc/b2image.1
doc/b2mng.1
doc/bsend.1
doc/bplay.1
doc/bmultiplexer.1
doc/blinkenproxy.1
src/Makefile
])
AC_MSG_RESULT([
Build options:
Version $VERSION
blib version $BLIB_VERSION
Install prefix $prefix
Tools:
b2b yes
b2image $have_pixbuf
b2mng $have_mng
blinkenproxy yes
bmultiplexer yes
bplay $have_aa
bsend yes
])