## Process this file with autoconf to produce a configure script. # try CFLAGS="$CFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes -Werror" AC_INIT(obexftp, 0.18, zany@triq.net) AM_INIT_AUTOMAKE(obexftp, 0.18) AM_CONFIG_HEADER(config.h) dnl AM_MAINTAINER_MODE # Checks for programs. AC_ISC_POSIX AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S # Initialize libtool AC_PROG_LIBTOOL # Checks for header files. AC_HEADER_STDC AC_HEADER_DIRENT AC_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]) # Checks for libraries. AM_PATH_OPENOBEX(1.0.0) AM_ICONV dnl IRDA_CHECK BLUETOOTH_CHECK SDPLIB_CHECK USB_CHECK # check for optional swig rebuild AC_ARG_ENABLE([swig], [AS_HELP_STRING([--enable-swig], [Rebuild language bindings @<:@default=no@:>@])], [case "${enableval}" in yes) want_swig_rebuild=true ;; no) want_swig_rebuild=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-swig) ;; esac],[want_swig_rebuild=false]) AM_CONDITIONAL(ENABLE_SWIG, test x$want_swig_rebuild = xtrue) if test x$want_swig_rebuild = xtrue; then AC_PROG_SWIG(1.3.7) dnl how low can we go? fi # check for language bindings AC_ARG_ENABLE([python], [AS_HELP_STRING([--disable-python], [Disables python language bindings @<:@default=auto@:>@])], [ac_python_enabled=$enableval], [ac_python_enabled=yes]) if test "$ac_python_enabled" = yes; then SWIG_PYTHON fi AM_CONDITIONAL([ENABLE_PYTHON], [test x"$PYTHON_CPPFLAGS" != x""]) AC_ARG_ENABLE([perl], [AS_HELP_STRING([--disable-perl], [Disables perl language bindings @<:@default=auto@:>@])], [ac_perl_enabled=$enableval], [ac_perl_enabled=yes]) if test "$ac_perl_enabled" = yes; then AC_PATH_PROG([PERL], [perl], []) fi AM_CONDITIONAL([ENABLE_PERL], [test x"$PERL" != x""]) AC_ARG_ENABLE([tcl], [AS_HELP_STRING([--disable-tcl], [Disables tcl language bindings @<:@default=auto@:>@])], [ac_tcl_enabled=$enableval], [ac_tcl_enabled=yes]) if test "$ac_tcl_enabled" = yes; then AC_PATH_PROG([TCLSH], [tclsh], []) fi AM_CONDITIONAL([ENABLE_TCL], [test x"$TCLSH" != x""]) dnl no need to build docs by default AC_ARG_ENABLE(builddocs, AS_HELP_STRING([--enable-builddocs], [Compile documentation @<:@default=no@:>@]), [case "${enableval}" in yes) builddocs=true ;; no) builddocs=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-builddocs) ;; esac],[builddocs=false]) AM_CONDITIONAL(BUILD_DOCS, test x$builddocs = xtrue) dnl Check for C99 __func__ AC_TRY_COMPILE([ #include], [printf(__func__)],, [AC_DEFINE(__func__, "", [non-C99 fake support for __func__])]) dnl Turn on all warnings but no debugging when using gcc if test "$ac_cv_prog_gcc" = "yes"; then CFLAGS="$CFLAGS -W -Wundef -Wmissing-declarations -Wmissing-prototypes" fi AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) CFLAGS="$CFLAGS -Wall" # Project-specific settings # VERSION="..." already set my AM_INIT_AUTOMAKE above RELEASE="1" # libtool uses current:release:age to produce .c-a.a.r # http://www.gnu.org/software/libtool/manual.html#Updating-version-info OBEXFTP_VERSION="1\:0\:1" MULTICOBEX_VERSION="1\:0\:0" BFB_VERSION="0\:4\:0" AC_SUBST(VERSION) AC_SUBST(RELEASE) AC_SUBST(OBEXFTP_VERSION) AC_SUBST(MULTICOBEX_VERSION) AC_SUBST(BFB_VERSION) # should use AC_CONFIG_FILES AC_OUTPUT([ Makefile swig/perl/Makefile swig/perl/Makefile.PL swig/python/Makefile swig/tcl/Makefile swig/Makefile contrib/Makefile doc/Makefile apps/Makefile bfb/Makefile multicobex/Makefile obexftp/Makefile obexftp.spec ])