## Process this file with autoconf to produce a configure script. # try CFLAGS="$CFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes -Werror" AC_INIT(obexftp, 0.10.8, zany@triq.net) AM_INIT_AUTOMAKE(obexftp, 0.10.8) AM_CONFIG_HEADER(config.h) dnl AM_MAINTAINER_MODE # Checks for programs. AC_ISC_POSIX AC_PROG_CC AC_PROG_INSTALL # Initialize libtool AM_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) dnl IRDA_CHECK BLUETOOTH_CHECK SDPLIB_CHECK USB_CHECK dnl no need to build docs by default AC_ARG_ENABLE(builddocs, AS_HELP_STRING([--enable-builddocs], [Compile documentation (default is disabled)]), [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 debugging and all warnings when using gcc if test "$ac_cv_prog_gcc" = "yes"; then CFLAGS="$CFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes" LDFLAGS="$LDFLAGS -g -Wall" 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" COBEXBFB_VERSION="0\:8\:0" COBEXPE_VERSION="0\:2\:0" BFB_VERSION="0\:4\:0" AC_SUBST(VERSION) AC_SUBST(RELEASE) AC_SUBST(OBEXFTP_VERSION) AC_SUBST(COBEXBFB_VERSION) AC_SUBST(COBEXPE_VERSION) AC_SUBST(BFB_VERSION) AC_OUTPUT([ Makefile contrib/Makefile apps/Makefile bfb/Makefile cobexbfb/Makefile obexftp/Makefile obexftp.spec ])