root/trunk/configure.in

Revision 225, 4.6 KB (checked in by zany, 3 months ago)

adding a simpler connect wrapper

Line 
1## Process this file with autoconf to produce a configure script.
2# try CFLAGS="$CFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes -Werror"
3AC_INIT(ObexFTP, 0.23, zany@triq.net)
4#AC_CONFIG_SRCDIR(src/foo.c)
5AM_INIT_AUTOMAKE(dist-bzip2)
6AM_CONFIG_HEADER(config.h)
7
8# note: AC_HELP_STRING is deprecated in autoconf 2.59 and later but
9# AS_HELP_STRING is not available in autoconf 2.57 or earlier.
10
11dnl AM_MAINTAINER_MODE
12
13# Checks for programs.
14AC_ISC_POSIX
15AC_PROG_CC
16AC_PROG_INSTALL
17AC_PROG_LN_S
18
19# Initialize libtool
20AC_PROG_LIBTOOL
21
22# Checks for header files.
23AC_HEADER_STDC
24AC_HEADER_DIRENT
25AC_CHECK_HEADERS([arpa/inet.h errno.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h termios.h unistd.h sys/select.h sys/times.h])
26
27AC_PATH_WIN32
28
29# Checks for libraries.
30PKG_CHECK_MODULES(OPENOBEX,openobex)
31REQUIRES="openobex"
32
33AM_ICONV
34AC_CHECK_HEADERS([langinfo.h])
35dnl IRDA_CHECK
36BLUETOOTH_CHECK
37if test "${bluez_found}" = "yes"; then
38        REQUIRES="$REQUIRES bluez"
39        SDPLIB_CHECK
40fi
41USB_CHECK
42if test "${am_cv_usb_found}" = "yes"; then
43        REQUIRES="$REQUIRES libusb"
44fi
45
46# check for optional swig rebuild
47AC_ARG_ENABLE([swig],
48                [AC_HELP_STRING([--enable-swig],
49                        [Rebuild language bindings @<:@default=no@:>@])],
50[case "${enableval}" in
51  yes) want_swig_rebuild=true ;;
52  no)  want_swig_rebuild=false ;;
53  *) AC_MSG_ERROR(bad value ${enableval} for --enable-swig) ;;
54esac],[want_swig_rebuild=false])
55AM_CONDITIONAL(ENABLE_SWIG, test x$want_swig_rebuild = xtrue)
56if test x$want_swig_rebuild = xtrue; then
57        AC_PROG_SWIG(1.3.7) dnl how low can we go?
58fi
59
60# check for language bindings
61AC_ARG_ENABLE([perl],
62              [AC_HELP_STRING([--disable-perl],
63                              [Disables perl language bindings @<:@default=auto@:>@])],
64              [ac_perl_enabled=$enableval],
65              [AC_CHECK_PROG([ac_perl_enabled],[perl],[yes],[no])])
66
67if test "$ac_perl_enabled" = yes; then
68        AC_PATH_PROG([PERL], [perl], [])
69fi
70AM_CONDITIONAL([ENABLE_PERL], [test x"$PERL" != x""])
71
72AC_ARG_ENABLE([python],
73              [AC_HELP_STRING([--disable-python],
74                              [Disables python language bindings @<:@default=auto@:>@])],
75              [ac_python_enabled=$enableval],
76              [AC_CHECK_PROG([ac_python_enabled],[python[$PYTHON_VERSION]],[yes],[no])])
77
78if test "$ac_python_enabled" = yes; then
79        AM_PATH_PYTHON
80fi
81AM_CONDITIONAL([ENABLE_PYTHON], [test x"$PYTHON" != x""])
82
83AC_ARG_ENABLE([ruby],
84              [AC_HELP_STRING([--disable-ruby],
85                              [Disables ruby language bindings @<:@default=auto@:>@])],
86              [ac_ruby_enabled=$enableval],
87              [AC_CHECK_PROG([ac_ruby_enabled],[ruby],[yes],[no])])
88
89if test "$ac_ruby_enabled" = yes; then
90        AC_PATH_PROG([RUBY], [ruby], [])
91fi
92AM_CONDITIONAL([ENABLE_RUBY], [test x"$RUBY" != x""])
93
94AC_ARG_ENABLE([tcl],
95              [AC_HELP_STRING([--enable-tcl],
96                              [Enables tcl language bindings @<:@default=off@:>@])],
97              [ac_tcl_enabled=$enableval],
98              [AC_CHECK_PROG([ac_tcl_enabled],[tclsh],[yes],[no])])
99
100if test "$ac_tcl_enabled" = yes; then
101        AC_PATH_PROG([TCLSH], [tclsh], [])
102fi
103AM_CONDITIONAL([ENABLE_TCL], [test x"$TCLSH" != x""])
104       
105
106dnl no need to build docs by default
107AC_ARG_ENABLE(builddocs,
108        AC_HELP_STRING([--enable-builddocs],
109                        [Compile documentation @<:@default=no@:>@]),
110[case "${enableval}" in
111  yes) builddocs=true ;;
112  no)  builddocs=false ;;
113  *) AC_MSG_ERROR(bad value ${enableval} for --enable-builddocs) ;;
114esac],[builddocs=false])
115AM_CONDITIONAL(BUILD_DOCS, test x$builddocs = xtrue)
116
117dnl Check for C99 __func__
118AC_TRY_COMPILE([
119    #include<stdio.h>],
120    [printf(__func__)],,
121    [AC_DEFINE(__func__, "", [non-C99 fake support for __func__])])
122
123dnl Turn on all warnings but no debugging when using gcc
124if test "$ac_cv_prog_gcc" = "yes"; then
125    CFLAGS="$CFLAGS -W -Wundef -Wmissing-declarations -Wmissing-prototypes"
126fi
127       
128AC_SUBST(CFLAGS)
129AC_SUBST(LDFLAGS)
130
131CFLAGS="$CFLAGS -Wall"
132
133# Project-specific settings
134# VERSION="..." already set my AM_INIT_AUTOMAKE above
135# libtool uses current:revision:age to produce .c-a.a.r
136# http://www.gnu.org/software/libtool/manual.html#Updating-version-info
137OBEXFTP_VERSION="3\:0\:3"
138MULTICOBEX_VERSION="1\:1\:0"
139BFB_VERSION="0\:5\:0"
140AC_SUBST(VERSION)
141AC_SUBST(OBEXFTP_VERSION)
142AC_SUBST(MULTICOBEX_VERSION)
143AC_SUBST(BFB_VERSION)
144AC_SUBST(REQUIRES)
145
146# should use AC_CONFIG_FILES
147AC_OUTPUT([
148Makefile
149swig/perl/Makefile
150swig/perl/Makefile.PL
151swig/python/Makefile
152swig/python/setup.py
153swig/ruby/Makefile
154swig/tcl/Makefile
155swig/Makefile
156examples/Makefile
157doc/Makefile
158apps/Makefile
159bfb/Makefile
160multicobex/Makefile
161obexftp/Makefile
162obexftp.spec
163obexftp.pc
164])
Note: See TracBrowser for help on using the browser.