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
|
# Process this file with autoconf to produce a configure script.
AC_INIT([garmintools],[0.10],[dave@daveb.net])
AC_CONFIG_SRCDIR(src/garmin.h)
AC_CONFIG_HEADERS(src/config.h:src/config.h.in)
AM_INIT_AUTOMAKE
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h termios.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_STRUCT_TM
# Checks for library functions.
AC_FUNC_SETVBUF_REVERSED
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([memset strerror])
# Check endianness
AC_C_BIGENDIAN
# Checks for libusb
PKG_CHECK_MODULES([USB],[libusb-1.0],
[],
[AC_MSG_ERROR(cannot build garmintools without libusb)])
# Checks for python
AC_ARG_WITH(python,[ --with-python compile python bindings.],
[
if test "${withval}" = "yes"; then
PYTHON_SUBDIRS="python"
AC_CHECK_PROG(HAVE_PYTHON, "python", "yes")
if test "${HAVE_PYTHON}" != "yes"; then
AC_MSG_ERROR([No usable python interpreter found])
fi
fi
])
PROG_LIBS="$USB_LIBS"
AC_SUBST(USB_CFLAGS)
AC_SUBST(USB_LIBS)
AC_SUBST(PROG_LIBS)
AC_SUBST(PYTHON_SUBDIRS)
AC_CONFIG_FILES([Makefile \
src/Makefile \
doc/Makefile \
doc/man/Makefile \
extras/Makefile])
if test "${HAVE_PYTHON}" = "yes"; then
AC_CONFIG_FILES([python/Makefile])
fi
AC_OUTPUT
|