1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# $Id: configure.ac 1213 2006-05-05 14:06:06Z lennart $
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
AC_PREREQ(2.57)
AC_INIT([avahi-sharp],[0.6.11],[avahi (at) lists (dot) freedesktop (dot) org])
#AC_CONFIG_SRCDIR([avahi-core/server.c])
#AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign 1.9 -Wall])
AC_SUBST(PACKAGE_URL, [http://avahi.org/])
if type -p stow > /dev/null && test -d /usr/local/stow ; then
AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
fi
# Checks for programs.
#AC_PROG_CC
#AC_PROG_CXX
AC_GNU_SOURCE
#AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_GCC_TRADITIONAL
# libtool stuff
AC_PROG_LIBTOOL
# Check for pkg-config manually first, as if its not installed the
# PKG_PROG_PKG_CONFIG macro won't be defined.
AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
if test x"$have_pkg_config" = "xno"; then
AC_MSG_ERROR(pkg-config is required to install this program)
fi
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES(AVAHI, [ avahi-client >= 0.6.9 avahi-glib >= 0.6.9 ])
# Assume the all of avahi is installed in the same libdir
AVAHILIBDIR=$(pkg-config --variable=libdir avahi-client)
if test "z$AVAHILIBDIR" = "z" ; then
echo "Error: couldn't get avahi's libdir"
exit 1
fi
AC_SUBST(AVAHILIBDIR)
#
# Check for mono stuff
#
HAVE_MONO=no
AC_ARG_ENABLE(mono,
AS_HELP_STRING([--disable-mono],[Disable mono bindings]),
[case "${enableval}" in
yes) HAVE_MONO=yes ;;
no) HAVE_MONO=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-mono) ;;
esac],
[HAVE_MONO=yes])
if test "x$HAVE_MONO" = "xyes" ; then
AC_PATH_PROG(MCS, mcs)
if test "x$MCS" = "x" ; then
AC_MSG_ERROR([Can not find "mcs" - The Mono C-Sharp Compiler) in your PATH])
fi
AC_PATH_PROG(GACUTIL, gacutil)
if test "x$GACUTIL" = "x" ; then
AC_MSG_ERROR([Can not find "gacutil" in your PATH])
fi
AC_SUBST(MCS)
AC_SUBST(GACUTIL)
fi
AM_CONDITIONAL(HAVE_MONO, test "x$HAVE_MONO" = "xyes")
#
# Check for monodoc stuff
#
HAVE_MONODOC=no
AC_ARG_ENABLE(monodoc,
AS_HELP_STRING([--disable-monodoc],[Disable documentation for mono bindings]),
[case "${enableval}" in
yes) HAVE_MONODOC=yes ;;
no) HAVE_MONODOC=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-monodoc) ;;
esac],
[HAVE_MONODOC=yes])
if test "x$HAVE_MONO" = "xyes" && test "x$HAVE_MONODOC" = "xyes" ; then
PKG_CHECK_MODULES(MONODOC, [monodoc >= 1.1.8])
MONODOC_DIR=`$PKG_CONFIG --variable=sourcesdir monodoc`
AC_PATH_PROG(MONODOCER, monodocer)
AC_PATH_PROG(MDASSEMBLER, mdassembler)
AC_SUBST(MONODOC_DIR)
AC_SUBST(MONODOCER)
AC_SUBST(MDASSEMBLER)
fi
AM_CONDITIONAL(HAVE_MONODOC, test "x$HAVE_MONODOC" = "xyes")
# ==========================================================================
AC_CONFIG_FILES([
Makefile
avahi-sharp/Makefile
])
AC_OUTPUT
# ==========================================================================
echo "
---{ $PACKAGE_NAME $VERSION }---
prefix: ${prefix}
sysconfdir: ${sysconfdir}
localstatedir: ${localstatedir}
Enable Mono: ${HAVE_MONO}
Enable Monodoc: ${HAVE_MONODOC}
"
echo "\
Building avahi-sharp: ${HAVE_MONO}
"
|