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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
|
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT(libbtctl, 0.10.0)
# Before making a release, the BTCTL_LT_VERSION string should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
# been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
# change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A
BTCTL_LT_VERSION=5:0:1
AC_SUBST(BTCTL_LT_VERSION)
AC_CONFIG_SRCDIR(src/btctl.c)
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])
AM_MAINTAINER_MODE
AC_CONFIG_HEADERS([config.h])
dnl Initialize libtool
AM_PROG_LIBTOOL
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
dnl Gettext stuff.
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=libbtctl
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"libbtctl",[Bluetooth controlling GObject.])
dnl Add the languages which your application supports here.
ALL_LINGUAS="be en_GB ja"
AM_GLIB_GNU_GETTEXT
AC_SUBST(DLOPEN)
AC_SUBST(DLPREOPEN)
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal, no)
AC_SUBST(GLIB_GENMARSHAL)
PKG_CHECK_MODULES(BTCTL, gobject-2.0 glib-2.0 >= 2.4.0)
AC_SUBST(BTCTL_CFLAGS)
AC_SUBST(BTCTL_LIBS)
BTCTL_DATA_DIR="$datadir/libbtctl"
AC_SUBST(BTCTL_DATA_DIR)
dnl bring in GTK for gtkdoc
PKG_CHECK_MODULES(GTK, gtk+-2.0)
AM_PATH_OPENOBEX(1.2)
dnl Bluetooth libraries
BLUEZ_PATH_BLUETOOTH([], AC_MSG_ERROR([libbluetooth is required to build this software - part of bluez-libs]))
dnl libsdp is only needed for bluez-libs,-sdp <= 2.6, so we test
dnl for it and add if needed
BLUEZ_PATH_SDP([HAVE_SDP=yes], AC_MSG_WARN([no libsdp but continuing anyway]))
if test "x$HAVE_SDP" = "xyes"; then
ADDSDPLIB="-lsdp"
BLUETOOTH_LIBS="$BLUETOOTH_LIBS -lsdp"
else
ADDSDPLIB=""
fi
AC_SUBST(ADDSDPLIB)
dnl Python bindings
PKG_CHECK_MODULES(BTCTLPY, pygtk-2.0, HAVE_PYTHON=yes, HAVE_PYTHON=no)
AC_MSG_CHECKING(for python support)
if test "x$HAVE_PYTHON" = "xyes"; then
AM_PATH_PYTHON(2.2)
AC_MSG_RESULT(yes)
DEFSDIR=`pkg-config --variable=defsdir pygtk-2.0`
AC_SUBST(DEFSDIR)
CODEGENDIR=`pkg-config --variable codegendir pygtk-2.0`
AC_SUBST(CODEGENDIR)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(HAVE_PYTHON, [test $HAVE_PYTHON = yes])
dnl Mono bindings
AC_ARG_ENABLE(mono, [ --enable-mono Build Mono bindings [default=auto]], enable_mono="$enableval", enable_mono=auto)
if test "x$enable_mono" = "xno" ; then
BUILD_MONO="no"
else
PKG_CHECK_MODULES(BTCTL_MONO, mono, HAVE_MONO=yes, HAVE_MONO=no)
PKG_CHECK_MODULES(BTCTL_GAPI, gapi-2.0, HAVE_GAPI=yes, HAVE_GAPI=no)
AC_MSG_CHECKING(for Mono support)
if test "x$HAVE_GAPI" = "xyes" && test "x$HAVE_MONO" = "xyes"; then
BUILD_MONO="yes"
AC_MSG_RESULT(yes)
GAPI_PREFIX=`pkg-config --variable=prefix gapi-2.0`
MONO_PREFIX=`pkg-config --variable=prefix mono`
MONOBIN=`pkg-config --variable=exec_prefix mono`/bin
GACUTIL="$MONOBIN/gacutil"
AC_SUBST(GAPI_PREFIX)
AC_SUBST(MONO_PREFIX)
AC_ARG_WITH(mono-instdir, [ --with-mono-instdir=PATH install Mono related files to this prefix ])
if test "x$with_mono_instdir" = "x" ; then
MONO_INSTDIR='${prefix}'
else
MONO_INSTDIR=$with_mono_instdir
fi
AC_SUBST(MONO_INSTDIR)
AC_SUBST(GACUTIL)
else
BUILD_MONO="no"
AC_MSG_RESULT(no)
fi
fi
AM_CONDITIONAL(BUILD_MONO, [test $BUILD_MONO = yes])
dnl This is a check for gtk-doc which you can insert into your configure.in.
dnl You shouldn't need to change it at all.
AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
if test "x$with_html_dir" = "x" ; then
HTML_DIR='${datadir}/gtk-doc/html'
else
HTML_DIR=$with_html_dir
fi
AC_SUBST(HTML_DIR)
gtk_doc_min_version=1.0
AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
if pkg-config --atleast-version=$gtk_doc_min_version gtk-doc; then
AC_MSG_RESULT(yes)
GTKDOC=true
else
AC_MSG_RESULT(no)
GTKDOC=false
fi
dnl Let people disable the gtk-doc stuff.
AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
if test x$enable_gtk_doc = xauto ; then
if test x$GTKDOC = xtrue ; then
enable_gtk_doc=yes
else
enable_gtk_doc=no
fi
fi
AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
dnl ==========================================================================
dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
AC_ARG_ENABLE(compile-warnings,
[ --enable-compile-warnings Maximum compiler warnings],
set_more_warnings="$enableval",[
if test -f $srcdir/CVSVERSION; then
is_cvs_version=true
set_more_warnings=yes
else
set_more_warnings=no
fi
])
AC_MSG_CHECKING(for more warnings, including -Werror)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
AC_MSG_RESULT(yes)
CFLAGS="\
-Wall \
-fno-strict-aliasing \
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith \
-Wcast-align -Wsign-compare \
-Werror \
$CFLAGS"
for option in -Wno-sign-compare; do
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$option $CFLAGS"
AC_MSG_CHECKING([whether gcc understands $option])
AC_TRY_COMPILE([], [],
has_option=yes,
has_option=no,)
if test $has_option = no; then
CFLAGS="$SAVE_CFLAGS"
fi
AC_MSG_RESULT($has_option)
unset has_option
unset SAVE_CFLAGS
done
unset option
else
AC_MSG_RESULT(no)
fi
AC_OUTPUT([
Makefile
libbtctl.pc
src/Makefile
po/Makefile.in
docs/Makefile
docs/reference/Makefile
mono/Makefile
mono/libbtctl/Makefile
mono/libbtctl/libbtctl-sharp.pc
mono/libbtctl/AssemblyInfo.cs
mono/sources/Makefile
])
|