mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 16:54:38 +08:00
89 lines
2.0 KiB
Plaintext
89 lines
2.0 KiB
Plaintext
dnl
|
|
dnl $Id$
|
|
dnl
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
dnl
|
|
AC_INIT()
|
|
|
|
dnl Guess host type.
|
|
AC_CANONICAL_SYSTEM
|
|
AC_CANONICAL_HOST
|
|
|
|
AM_INIT_AUTOMAKE(bluez-utils, 2.2)
|
|
|
|
AC_SUBST(DISTRO)
|
|
AC_SUBST(PCMCIA)
|
|
|
|
AC_SUBST(GLIB_CFLAGS)
|
|
AC_SUBST(GLIB_LDFLAGS)
|
|
|
|
CFLAGS="-Wall -g -O2"
|
|
|
|
AC_PREFIX_DEFAULT()
|
|
|
|
dnl Check for programs.
|
|
AC_PROG_CC
|
|
AC_PROG_AWK
|
|
AC_PROG_INSTALL
|
|
AC_CHECK_TOOL(LD, ld, ld)
|
|
AC_CHECK_TOOL(AR, ar, ar)
|
|
AC_PROG_INSTALL
|
|
AC_PROG_YACC
|
|
AM_PROG_LEX
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
AC_ARG_WITH(bluez-libs,
|
|
--with-bluez-libs=DIR BlueZ libraries,
|
|
BLUEZ_LIBDIR="$withval",
|
|
BLUEZ_LIBDIR='../libs/src /usr/lib'
|
|
)
|
|
|
|
AC_ARG_WITH(bluez-includes,
|
|
--with-bluez-includes=DIR BlueZ header files,
|
|
BLUEZ_INCDIR="$withval",
|
|
BLUEZ_INCDIR='../libs/include /usr/include'
|
|
)
|
|
|
|
AC_SEARCH_HEADERS(bluetooth/bluetooth.h, $BLUEZ_INCDIR,,
|
|
AC_MSG_ERROR(Bluetooth headers not found.
|
|
Please compile and install bluez-libs package.)
|
|
)
|
|
|
|
AC_SEARCH_LIB(bluetooth, hci_open_dev, $BLUEZ_LIBDIR,,
|
|
AC_MSG_ERROR(Bluetooth library not found.
|
|
Please compile and install bluez-libs package.)
|
|
)
|
|
|
|
AC_ARG_WITH(glib-config,
|
|
--with-glib-config=prog glib-config location,
|
|
GLIB_CONFIG="$withval",
|
|
[
|
|
AC_PATH_PROGS(GLIB_CONFIG, glib-config, no)
|
|
if test "$GLIB_CONFIG" = "no"; then
|
|
AC_MSG_ERROR(GLib not found)
|
|
fi
|
|
]
|
|
)
|
|
GLIB_CFLAGS="`$GLIB_CONFIG --cflags`"
|
|
GLIB_LDFLAGS="`$GLIB_CONFIG --libs`"
|
|
|
|
dnl Check for distro type.
|
|
DISTRO=unknown
|
|
|
|
if test "$cross_compiling" != yes; then
|
|
AC_TEST_FILE(/etc/redhat-release, DISTRO=redhat)
|
|
AC_TEST_FILE(/etc/mandrake-release, DISTRO=redhat)
|
|
AC_TEST_FILE(/etc/debian_version, DISTRO=debian)
|
|
fi
|
|
|
|
dnl Check for PCMCIA
|
|
AC_ARG_ENABLE(pcmcia,
|
|
--enable-pcmcia Always install PCMCIA support files,
|
|
[PCMCIA=pcmcia],
|
|
[ if test "$cross_compiling" != yes; then
|
|
AC_TEST_DIR(/etc/pcmcia, PCMCIA=pcmcia, PCMCIA=)
|
|
fi ])
|
|
|
|
AC_OUTPUT(Makefile hcid/Makefile tools/Makefile rfcomm/Makefile test/Makefile scripts/Makefile pcmcia/Makefile)
|