File: configure.in

package info (click to toggle)
multisync 0.82-9
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 15,784 kB
  • ctags: 5,488
  • sloc: ansic: 36,511; sh: 17,141; yacc: 1,377; makefile: 837
file content (98 lines) | stat: -rw-r--r-- 3,077 bytes parent folder | download
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
dnl Process this file with autoconf to produce a configure script.

AC_INIT(configure.in)
AM_INIT_AUTOMAKE(irmc_sync, 0.82)
AM_CONFIG_HEADER(config.h)

pkg_modules="libgnomeui-2.0 glib-2.0"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC


dnl Add the languages which your application supports here.
dnl ALL_LINGUAS=""
dnl AM_GNU_GETTEXT


CPPFLAGS="${PACKAGE_CFLAGS}"
AC_CHECK_LIB(bluetooth,baswap,BLUETOOTH=1,BLUETOOTH=0)
SDP=0
AC_CHECK_LIB(bluetooth,sdp_list_free,SDP=1,BLUETOOTH=0)
AC_MSG_CHECKING(for correct SDP lib version)
AC_TRY_COMPILE([
#include <bluetooth/sdp.h>
#include <bluetooth/sdp_lib.h>
],[sdp_record_t t;],AC_MSG_RESULT(yes),BLUETOOTH=0;AC_MSG_RESULT(no))
AM_CONDITIONAL(BLUETOOTH,test "${BLUETOOTH}" = "1")
if test "x${BLUETOOTH}" = "x0"; then
  echo "Bluetooth is DISABLED. You must have bluez-libs and bluez-kernel >= 2.3 and bluez-sdp >= 1.0-pre1."
fi
AC_DEFINE_UNQUOTED(HAVE_BLUETOOTH, ${BLUETOOTH},Defined if Bluetooth is enabled.)
LIBS="$LIBS -lglib-2.0"
AC_CHECK_LIB(openobex,OBEX_Init,,AC_MSG_ERROR(You must have openobex installed.))
AC_MSG_CHECKING(for working openobex)
AC_TRY_COMPILE([
#include <openobex/obex.h>],[obex_ctrans_t t; t.customdata = 0;],CUSTOMDATA=1,CUSTOMDATA=0)
AC_TRY_COMPILE([
#include <openobex/obex.h>],[obex_ctrans_t t; t.userdata = 0;],USERDATA=1,USERDATA=0)
AC_DEFINE_UNQUOTED(OBEX_CUSTOMDATA, ${CUSTOMDATA},Defined if obex_ctrans_t contains the field customdata.)
AC_DEFINE_UNQUOTED(OBEX_USERDATA, ${USERDATA},Defined if obex_ctrans_t contains the field userdata.)
if !(( ${CUSTOMDATA} || ${USERDATA} )); then
  AC_MSG_ERROR(You must have openobex 0.9.8 or openobex >= 1.0.0 installed.)
fi
AC_MSG_RESULT(yes)
dnl AC_CHECK_LIB(openobex,BtOBEX_TransportConnect,BT_OBEX=1,BT_OBEX=0)
dnl Some OpenObex-1.0.0 seem to have BT disabled
BT_OBEX=0
AC_DEFINE_UNQUOTED(HAVE_BT_OBEX, (${BT_OBEX} && ${BLUETOOTH}),Defined if OpenOBEX can be used to access Bluetooth.)
AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(You must have libpthread installed.))
AC_MSG_CHECKING(for IrDA support)
AC_TRY_COMPILE([
#include <sys/socket.h>
#include <linux/types.h>
#include <linux/irda.h>],[],IRDA=1; AC_MSG_RESULT(yes), IRDA=0;AC_MSG_RESULT(no) )
AC_DEFINE_UNQUOTED(HAVE_IRDA, ${IRDA},Defined if IrDA is enabled.)


AC_PROG_LIBTOOL

dnl Info for the RPM
MULTISYNC_TOP="../.."
AC_SUBST(VERSION)
AC_SUBST(prefix)
MULTISYNC_VERSION=`grep "#define VERSION" ${MULTISYNC_TOP}/config.h | sed -e 's/#define VERSION //g' | sed -e 's/\"//g'`
AC_SUBST(MULTISYNC_VERSION)


AC_OUTPUT([
Makefile
src/Makefile
src/bfb/Makefile
intl/Makefile
po/Makefile.in
${MULTISYNC_TOP}/specs/multisync-irmc.spec
${MULTISYNC_TOP}/specs/multisync-irmc-bluetooth.spec
])

echo
echo ======================
echo IRMC-Sync detected features:
if test "x${IRDA}" = "x1"; then
    echo IrDA is ENABLED.
else
    echo IrDA is DISABLED.
fi
if test "x${BLUETOOTH}" = "x1"; then
    echo Bluetooth is ENABLED.
else
    echo Bluetooth is DISABLED.
fi
echo ======================