2003-02-25 00:57:27 +00:00
|
|
|
#
|
|
|
|
# avrdude - A Downloader/Uploader for AVR device programmers
|
2004-01-27 04:27:18 +00:00
|
|
|
# Copyright (C) 2003, 2004 Theodore A. Roth <troth@openavr.org>
|
2003-02-25 00:57:27 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2012-11-20 14:03:50 +00:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2003-02-25 00:57:27 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
|
2003-02-14 20:34:03 +00:00
|
|
|
# Process this file with autoconf to produce a configure script.
|
2003-02-25 00:57:27 +00:00
|
|
|
|
2012-01-31 09:52:41 +00:00
|
|
|
AC_PREREQ(2.60)
|
2014-05-19 10:01:59 +00:00
|
|
|
AC_INIT(avrdude, 6.1-20140519, avrdude-dev@nongnu.org)
|
2003-02-25 00:57:27 +00:00
|
|
|
|
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AC_CANONICAL_TARGET
|
|
|
|
|
2003-02-14 20:34:03 +00:00
|
|
|
AC_CONFIG_SRCDIR([main.c])
|
2003-03-06 06:45:54 +00:00
|
|
|
AM_INIT_AUTOMAKE
|
2013-04-25 20:14:44 +00:00
|
|
|
AC_CONFIG_HEADERS(ac_cfg.h)
|
2014-05-19 08:46:52 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2003-02-14 20:34:03 +00:00
|
|
|
|
2014-05-16 17:50:40 +00:00
|
|
|
LT_INIT()
|
|
|
|
|
2003-02-14 20:34:03 +00:00
|
|
|
# Checks for programs.
|
2009-02-23 21:36:04 +00:00
|
|
|
AC_PROG_CC
|
2003-02-14 20:34:03 +00:00
|
|
|
AC_PROG_INSTALL
|
2012-01-30 20:47:26 +00:00
|
|
|
AC_PROG_SED
|
2003-02-14 20:34:03 +00:00
|
|
|
AC_PROG_YACC
|
2009-02-23 21:36:04 +00:00
|
|
|
AC_PROG_LEX
|
2013-09-09 15:00:36 +00:00
|
|
|
AN_MAKEVAR([AR], [AC_PROG_AR])
|
|
|
|
AN_PROGRAM([ar], [AC_PROG_AR])
|
|
|
|
AC_DEFUN([AC_PROG_AR], [AC_CHECK_TARGET_TOOL(AR, ar, :)])
|
|
|
|
AC_PROG_AR
|
2012-01-17 20:56:37 +00:00
|
|
|
AH_TEMPLATE([HAVE_YYLEX_DESTROY],
|
|
|
|
[Define if lex/flex has yylex_destroy])
|
|
|
|
# flex should have this
|
|
|
|
if test "x$LEX" == xflex; then
|
2012-01-30 20:47:26 +00:00
|
|
|
AC_MSG_CHECKING([whether yylex_destroy is generated by flex])
|
|
|
|
flex_version=`$LEX -V -v --version 2>/dev/null | $SED -e 's/^.* //'`
|
|
|
|
case $flex_version in
|
|
|
|
[[0-1].*)]
|
|
|
|
AC_MSG_RESULT([version $flex_version => no])
|
|
|
|
;;
|
|
|
|
[2.[0-4].*)]
|
|
|
|
AC_MSG_RESULT([version $flex_version => no])
|
|
|
|
;;
|
|
|
|
[2.5.[0-8])]
|
|
|
|
AC_MSG_RESULT([version $flex_version => no])
|
|
|
|
;;
|
|
|
|
[2.5.[0-8][A-Za-z]*)]
|
|
|
|
AC_MSG_RESULT([version $flex_version => no])
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT([version $flex_version => yes])
|
|
|
|
AC_DEFINE([HAVE_YYLEX_DESTROY])
|
|
|
|
;;
|
|
|
|
esac
|
2012-01-17 20:56:37 +00:00
|
|
|
fi
|
2003-02-14 20:34:03 +00:00
|
|
|
|
2009-04-14 18:51:26 +00:00
|
|
|
dnl Makefile.am:77: compiling `config_gram.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.ac'
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
|
2003-02-14 20:34:03 +00:00
|
|
|
# Checks for libraries.
|
|
|
|
AC_CHECK_LIB([termcap], [tputs])
|
2003-05-05 02:29:28 +00:00
|
|
|
AC_CHECK_LIB([ncurses], [tputs])
|
2003-02-14 20:34:03 +00:00
|
|
|
AC_CHECK_LIB([readline], [readline])
|
2012-02-02 16:52:45 +00:00
|
|
|
AH_TEMPLATE([HAVE_LIBELF],
|
|
|
|
[Define if ELF support is enabled via libelf])
|
2014-01-22 10:44:18 +00:00
|
|
|
AC_CHECK_LIB([elf], [elf_getshdrstrndx], [have_libelf=yes])
|
2012-02-02 16:52:45 +00:00
|
|
|
if test x$have_libelf = xyes; then
|
|
|
|
case $target in
|
|
|
|
*)
|
|
|
|
LIBELF="-lelf"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_DEFINE([HAVE_LIBELF])
|
2012-07-18 12:42:47 +00:00
|
|
|
AC_CHECK_HEADERS([libelf.h libelf/libelf.h])
|
2012-02-02 16:52:45 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(LIBELF, $LIBELF)
|
|
|
|
|
2009-02-23 21:36:04 +00:00
|
|
|
AC_SEARCH_LIBS([gethostent], [nsl])
|
|
|
|
AC_SEARCH_LIBS([setsockopt], [socket])
|
2006-09-24 13:35:40 +00:00
|
|
|
AH_TEMPLATE([HAVE_LIBUSB],
|
|
|
|
[Define if USB support is enabled via libusb])
|
|
|
|
AC_CHECK_LIB([usb], [usb_get_string_simple], [have_libusb=yes])
|
|
|
|
if test x$have_libusb = xyes; then
|
|
|
|
case $target in
|
|
|
|
*-*-darwin*)
|
|
|
|
LIBUSB="-lusb -framework CoreFoundation -framework IOKit"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
LIBUSB="-lusb"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_DEFINE([HAVE_LIBUSB])
|
2012-01-20 09:39:56 +00:00
|
|
|
AC_CHECK_HEADERS([usb.h])
|
|
|
|
AC_CHECK_HEADERS([lusb0_usb.h])
|
2006-09-24 13:35:40 +00:00
|
|
|
fi
|
2006-08-11 16:00:12 +00:00
|
|
|
AC_SUBST(LIBUSB, $LIBUSB)
|
2003-02-14 20:34:03 +00:00
|
|
|
|
2010-03-12 18:27:56 +00:00
|
|
|
AH_TEMPLATE([HAVE_LIBUSB_1_0],
|
|
|
|
[Define if USB support is enabled via libusb 1.0])
|
|
|
|
AC_CHECK_LIB([usb-1.0], [libusb_init], [have_libusb_1_0=yes])
|
|
|
|
if test x$have_libusb_1_0 = xyes; then
|
|
|
|
case $target in
|
|
|
|
*-*-darwin*)
|
|
|
|
LIBUSB_1_0="-lusb-1.0 -framework CoreFoundation -framework IOKit"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
LIBUSB_1_0="-lusb-1.0"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_DEFINE([HAVE_LIBUSB_1_0])
|
|
|
|
AC_CHECK_HEADERS([libusb-1.0/libusb.h])
|
|
|
|
AC_CHECK_HEADERS([libusb.h])
|
2011-08-25 18:41:48 +00:00
|
|
|
fi
|
|
|
|
AH_TEMPLATE([HAVE_LIBUSB_1_0],
|
|
|
|
[Define if USB support is enabled via a libusb-1.0 compatible libusb])
|
|
|
|
AC_CHECK_LIB([usb], [libusb_init], [have_libusb_1_0=yes])
|
|
|
|
if test x$have_libusb_1_0 = xyes; then
|
|
|
|
case $target in
|
|
|
|
*-*-freebsd*)
|
|
|
|
# FreeBSD 8+ has a native libusb-1.0 API compatible
|
|
|
|
# library offered by -lusb (which is also libusb-0.1
|
|
|
|
# compatible). FreeBSD <8 does not have a libusb-1.0
|
|
|
|
# at all so probing will fail but we do not have to
|
|
|
|
# special-case that.
|
|
|
|
LIBUSB_1_0="-lusb"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
LIBUSB_1_0="-lusb-1.0"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_DEFINE([HAVE_LIBUSB_1_0])
|
|
|
|
AC_CHECK_HEADERS([libusb.h])
|
2010-03-12 18:27:56 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(LIBUSB_1_0, $LIBUSB_1_0)
|
2013-05-15 18:55:19 +00:00
|
|
|
AH_TEMPLATE([HAVE_LIBFTDI1],
|
|
|
|
[Define if FTDI support is enabled via libftdi1])
|
2011-08-25 16:12:30 +00:00
|
|
|
AH_TEMPLATE([HAVE_LIBFTDI],
|
|
|
|
[Define if FTDI support is enabled via libftdi])
|
2012-08-15 17:31:11 +00:00
|
|
|
AH_TEMPLATE([HAVE_LIBFTDI_TYPE_232H],
|
|
|
|
[Define if libftdi supports FT232H, libftdi version >= 0.20])
|
2013-04-27 20:52:01 +00:00
|
|
|
AC_CHECK_LIB([ftdi1], [ftdi_new], [have_libftdi1=yes], [], [-lusb-1.0])
|
2013-05-15 18:55:19 +00:00
|
|
|
AC_CHECK_LIB([ftdi], [ftdi_usb_get_strings], [have_libftdi=yes], [], [-lusb])
|
2013-04-27 20:52:01 +00:00
|
|
|
if test x$have_libftdi1 = xyes; then
|
2013-05-15 18:55:19 +00:00
|
|
|
LIBFTDI1="-lftdi1"
|
|
|
|
AC_DEFINE([HAVE_LIBFTDI1])
|
|
|
|
AC_SUBST(LIBFTDI1, $LIBFTDI1)
|
|
|
|
else
|
|
|
|
if test x$have_libftdi = xyes; then
|
|
|
|
LIBFTDI="-lftdi -lusb"
|
|
|
|
AC_DEFINE([HAVE_LIBFTDI])
|
|
|
|
AC_SUBST(LIBFTDI, $LIBFTDI)
|
2013-05-16 17:11:35 +00:00
|
|
|
AC_CHECK_DECL(TYPE_232H,[have_libftdi_FT232H=yes], [], [[#include <ftdi.h>]])
|
|
|
|
if test x$have_libftdi_FT232H = xyes; then
|
|
|
|
AC_DEFINE([HAVE_LIBFTDI_TYPE_232H])
|
|
|
|
fi
|
2013-05-15 18:55:19 +00:00
|
|
|
fi
|
2013-04-27 20:52:01 +00:00
|
|
|
fi
|
2012-06-13 20:45:22 +00:00
|
|
|
AC_CHECK_HEADERS([pthread.h])
|
|
|
|
# as there exits header file only pthread implementations for Windows, check if we have a library
|
|
|
|
AC_CHECK_LIB([pthread], [pthread_create], [have_pthread=yes])
|
|
|
|
if test x$have_pthread = xyes; then
|
|
|
|
LIBPTHREAD="-lpthread"
|
|
|
|
fi
|
|
|
|
AC_SUBST(LIBPTHREAD, $LIBPTHREAD)
|
2007-01-12 22:41:05 +00:00
|
|
|
# Checks for header files.
|
|
|
|
AC_CHECK_HEADERS([limits.h stdlib.h string.h])
|
|
|
|
AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/time.h termios.h unistd.h])
|
|
|
|
AC_CHECK_HEADERS([ddk/hidsdi.h],,,[#include <windows.h>
|
|
|
|
#include <setupapi.h>])
|
|
|
|
|
2010-03-12 18:27:56 +00:00
|
|
|
|
2007-01-12 22:41:05 +00:00
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
AC_HEADER_TIME
|
|
|
|
|
2014-11-25 20:00:33 +00:00
|
|
|
# WinSock2
|
|
|
|
AC_CHECK_LIB([ws2_32], [puts])
|
|
|
|
|
2007-01-12 22:41:05 +00:00
|
|
|
# Checks for library functions.
|
2010-01-22 16:40:17 +00:00
|
|
|
AC_CHECK_FUNCS([memset select strcasecmp strdup strerror strncasecmp strtol strtoul gettimeofday usleep])
|
2007-01-12 22:41:05 +00:00
|
|
|
|
2006-12-20 23:43:34 +00:00
|
|
|
AC_MSG_CHECKING([for a Win32 HID libray])
|
|
|
|
SAVED_LIBS="${LIBS}"
|
|
|
|
case $target in
|
2007-01-12 22:41:05 +00:00
|
|
|
*-*-mingw32* | *-*-cygwin* | *-*-windows*)
|
2006-12-20 23:43:34 +00:00
|
|
|
LIBHID="-lhid -lsetupapi"
|
2007-01-12 22:41:05 +00:00
|
|
|
if test $ac_cv_header_ddk_hidsdi_h = yes
|
|
|
|
then
|
|
|
|
HIDINCLUDE="#include <ddk/hidsdi.h>"
|
|
|
|
else
|
|
|
|
HIDINCLUDE="#include \"my_ddk_hidsdi.h\""
|
|
|
|
fi
|
2006-12-20 23:43:34 +00:00
|
|
|
;;
|
|
|
|
*)
|
2007-01-12 22:41:05 +00:00
|
|
|
LIBHID=""
|
2006-12-20 23:43:34 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
LIBS="${LIBS} ${LIBHID}"
|
|
|
|
|
|
|
|
AH_TEMPLATE([HAVE_LIBHID],
|
|
|
|
[Define if HID support is enabled via the Win32 DDK])
|
2014-01-17 08:27:48 +00:00
|
|
|
AC_TRY_LINK([#include <windows.h>
|
2006-12-20 23:43:34 +00:00
|
|
|
#include <setupapi.h>
|
2014-01-17 08:27:48 +00:00
|
|
|
$HIDINCLUDE],
|
|
|
|
[int
|
2006-12-20 23:43:34 +00:00
|
|
|
main(void)
|
|
|
|
{
|
|
|
|
GUID hidGuid;
|
|
|
|
HidD_GetHidGuid(&hidGuid);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2014-01-17 08:27:48 +00:00
|
|
|
], [have_libhid=yes], [have_libhid=no])
|
2006-12-20 23:43:34 +00:00
|
|
|
AC_MSG_RESULT([$have_libhid])
|
|
|
|
if test x$have_libhid = xyes; then
|
|
|
|
AC_DEFINE([HAVE_LIBHID])
|
|
|
|
else
|
|
|
|
LIBHID=""
|
|
|
|
fi
|
|
|
|
LIBS="${SAVED_LIBS}"
|
2007-01-12 22:41:05 +00:00
|
|
|
AC_SUBST(LIBHID, $LIBHID)
|
2003-02-14 20:34:03 +00:00
|
|
|
|
2009-02-23 22:04:57 +00:00
|
|
|
# Check for types
|
|
|
|
|
|
|
|
# Solaris has uint_t and ulong_t typedefs in <sys/types.h>, avoid
|
|
|
|
# the redeclaration in usbtiny.c.
|
|
|
|
AC_CHECK_TYPES([uint_t], [], [], [#include <sys/types.h>])
|
|
|
|
AC_CHECK_TYPES([ulong_t], [], [], [#include <sys/types.h>])
|
|
|
|
|
2003-02-25 00:57:27 +00:00
|
|
|
# Checks for misc stuff.
|
|
|
|
|
2003-03-06 07:48:08 +00:00
|
|
|
AC_ARG_ENABLE(
|
|
|
|
[versioned-doc],
|
|
|
|
AC_HELP_STRING(
|
|
|
|
[--enable-versioned-doc],
|
|
|
|
[install docs in directory with version name (default)]),
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) versioned_doc=yes ;;
|
|
|
|
no) versioned_doc=no ;;
|
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for versioned-doc option) ;;
|
|
|
|
esac],
|
|
|
|
[versioned_doc=yes])
|
|
|
|
|
|
|
|
if test "$versioned_doc" = "yes"; then
|
|
|
|
DOC_INST_DIR='$(DESTDIR)$(datadir)/doc/avrdude-$(VERSION)'
|
|
|
|
else
|
|
|
|
DOC_INST_DIR='$(DESTDIR)$(datadir)/doc/avrdude'
|
|
|
|
fi
|
|
|
|
|
2005-02-10 14:54:57 +00:00
|
|
|
AC_ARG_ENABLE(
|
|
|
|
[doc],
|
|
|
|
AC_HELP_STRING(
|
|
|
|
[--enable-doc],
|
2006-11-07 20:32:41 +00:00
|
|
|
[Enable building documents]),
|
2005-02-10 14:54:57 +00:00
|
|
|
[case "${enableval}" in
|
|
|
|
yes) enabled_doc=yes ;;
|
|
|
|
no) enabled_doc=no ;;
|
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for disable-doc option) ;;
|
|
|
|
esac],
|
|
|
|
[enabled_doc=no])
|
|
|
|
|
2005-11-01 23:02:06 +00:00
|
|
|
AC_ARG_ENABLE(
|
|
|
|
[parport],
|
|
|
|
AC_HELP_STRING(
|
|
|
|
[--enable-parport],
|
|
|
|
[Enable accessing parallel ports(default)]),
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) enabled_parport=yes ;;
|
|
|
|
no) enabled_parport=no ;;
|
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for enable-parport option) ;;
|
|
|
|
esac],
|
|
|
|
[enabled_parport=yes])
|
2013-01-09 19:23:30 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(
|
|
|
|
[linuxgpio],
|
|
|
|
AC_HELP_STRING(
|
|
|
|
[--enable-linuxgpio],
|
|
|
|
[Enable the Linux sysfs GPIO interface programmer type]),
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) enabled_linuxgpio=yes ;;
|
|
|
|
no) enabled_linuxgpio=no ;;
|
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for enable-linuxgpio option) ;;
|
|
|
|
esac],
|
|
|
|
[enabled_linuxgpio=no])
|
2005-11-01 23:02:06 +00:00
|
|
|
|
2005-02-10 14:54:57 +00:00
|
|
|
DIST_SUBDIRS_AC='doc windows'
|
|
|
|
|
2007-01-30 14:41:57 +00:00
|
|
|
if test "$enabled_doc" = "yes"; then
|
2008-07-25 21:06:55 +00:00
|
|
|
SUBDIRS_AC='doc'
|
2007-01-30 14:41:57 +00:00
|
|
|
else
|
2008-07-25 21:06:55 +00:00
|
|
|
SUBDIRS_AC=''
|
2005-02-10 14:54:57 +00:00
|
|
|
fi
|
|
|
|
|
2003-03-06 07:48:08 +00:00
|
|
|
AC_SUBST(DOC_INST_DIR, $DOC_INST_DIR)
|
2005-11-01 23:02:06 +00:00
|
|
|
AC_SUBST(SUBDIRS_AC, $SUBDIRS_AC)
|
2005-02-10 14:54:57 +00:00
|
|
|
AC_SUBST(DIST_SUBDIRS_AC, $DIST_SUBDIRS_AC)
|
|
|
|
|
2003-03-06 07:48:08 +00:00
|
|
|
|
2003-02-25 00:57:27 +00:00
|
|
|
# Find the parallel serial device files based on target system
|
|
|
|
# If a system doesn't have a PC style parallel, mark it as unknown.
|
|
|
|
case $target in
|
2005-11-28 09:47:23 +00:00
|
|
|
i[[3456]]86-*-linux*|x86_64-*-linux*)
|
2003-02-25 00:57:27 +00:00
|
|
|
DEFAULT_PAR_PORT="/dev/parport0"
|
|
|
|
DEFAULT_SER_PORT="/dev/ttyS0"
|
|
|
|
;;
|
|
|
|
*-*-linux*)
|
|
|
|
DEFAULT_PAR_PORT="unknown"
|
|
|
|
DEFAULT_SER_PORT="/dev/ttyS0"
|
|
|
|
;;
|
2010-01-17 16:58:06 +00:00
|
|
|
i[[3456]]86-*-*freebsd*|amd64-*-*freebsd*)
|
2003-02-25 00:57:27 +00:00
|
|
|
DEFAULT_PAR_PORT="/dev/ppi0"
|
2010-01-17 17:35:30 +00:00
|
|
|
DEFAULT_SER_PORT="/dev/cuad0"
|
2003-02-25 00:57:27 +00:00
|
|
|
;;
|
2010-01-17 16:58:06 +00:00
|
|
|
*-*-*freebsd*)
|
2003-02-25 00:57:27 +00:00
|
|
|
DEFAULT_PAR_PORT="unknown"
|
2010-01-17 17:35:30 +00:00
|
|
|
DEFAULT_SER_PORT="/dev/cuad0"
|
2003-02-25 00:57:27 +00:00
|
|
|
;;
|
2005-11-01 23:02:06 +00:00
|
|
|
*-*-solaris*)
|
2005-11-03 22:37:37 +00:00
|
|
|
DEFAULT_PAR_PORT="/dev/printers/0"
|
2005-11-01 23:02:06 +00:00
|
|
|
DEFAULT_SER_PORT="/dev/term/a"
|
|
|
|
;;
|
2003-02-25 00:57:27 +00:00
|
|
|
*-*-msdos* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
|
|
|
|
DEFAULT_PAR_PORT="lpt1"
|
|
|
|
DEFAULT_SER_PORT="com1"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
DEFAULT_PAR_PORT="unknown"
|
|
|
|
DEFAULT_SER_PORT="unknown"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2005-11-01 23:02:06 +00:00
|
|
|
if test "$enabled_parport" = "yes"; then
|
|
|
|
AC_MSG_CHECKING([for parallel device])
|
|
|
|
if test "$DEFAULT_PAR_PORT" = "unknown"; then
|
|
|
|
AC_MSG_NOTICE([parallel port access disabled for this system])
|
|
|
|
enabled_parport=no
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([$DEFAULT_PAR_PORT])
|
|
|
|
fi
|
|
|
|
AC_SUBST(DEFAULT_PAR_PORT, $DEFAULT_PAR_PORT)
|
|
|
|
fi
|
2003-02-25 00:57:27 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([for serial device])
|
|
|
|
AC_MSG_RESULT([$DEFAULT_SER_PORT])
|
|
|
|
AC_SUBST(DEFAULT_SER_PORT, $DEFAULT_SER_PORT)
|
|
|
|
|
2005-11-01 23:02:06 +00:00
|
|
|
if test "$enabled_parport" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_PARPORT, 1, [parallel port access enabled])
|
|
|
|
confsubst="-e /^@HAVE_PARPORT_/d"
|
|
|
|
else
|
|
|
|
confsubst="-e /^@HAVE_PARPORT_BEGIN@/,/^@HAVE_PARPORT_END@/d"
|
|
|
|
fi
|
|
|
|
|
2013-01-09 19:23:30 +00:00
|
|
|
|
|
|
|
if test "$enabled_linuxgpio" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_LINUXGPIO, 1, [Linux sysfs GPIO support enabled])
|
|
|
|
confsubst="$confsubst -e /^@HAVE_LINUXGPIO_/d"
|
|
|
|
else
|
|
|
|
confsubst="$confsubst -e /^@HAVE_LINUXGPIO_BEGIN@/,/^@HAVE_LINUXGPIO_END@/d"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2003-09-05 04:23:27 +00:00
|
|
|
# If we are compiling with gcc, enable all warning and make warnings errors.
|
|
|
|
if test "$GCC" = yes; then
|
|
|
|
ENABLE_WARNINGS="-Wall"
|
2009-11-04 23:42:16 +00:00
|
|
|
|
|
|
|
# does this compiler support -Wno-pointer-sign ?
|
|
|
|
AC_MSG_CHECKING([if gcc accepts -Wno-pointer-sign ])
|
|
|
|
|
|
|
|
safe_CFLAGS=$CFLAGS
|
|
|
|
CFLAGS="$ENABLE_WARNINGS -Wno-pointer-sign"
|
|
|
|
|
|
|
|
AC_TRY_COMPILE(, [ int main () { return 0 ; } ], [
|
|
|
|
no_pointer_sign=yes
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
], [
|
|
|
|
no_pointer_sign=no
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
])
|
|
|
|
CFLAGS=$safe_CFLAGS
|
|
|
|
|
|
|
|
if test x$no_pointer_sign = xyes; then
|
|
|
|
ENABLE_WARNINGS="$ENABLE_WARNINGS -Wno-pointer-sign"
|
|
|
|
fi
|
2003-09-05 04:23:27 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(ENABLE_WARNINGS,$ENABLE_WARNINGS)
|
|
|
|
|
2010-01-19 10:03:05 +00:00
|
|
|
# See if we need to drop into the windows subdir.
|
|
|
|
case $target in
|
|
|
|
*-*-mingw32* | *-*-cygwin* | *-*-windows*)
|
|
|
|
if test "$GCC" = yes -a \( "$CC" = "cc" -o "$CC" = "gcc" \); then
|
|
|
|
# does this compiler support -mno-cygwin?
|
|
|
|
AC_MSG_CHECKING([if $CC accepts -mno-cygwin])
|
|
|
|
|
2010-01-22 16:40:17 +00:00
|
|
|
safe_CFLAGS="$CFLAGS"
|
2010-01-19 10:03:05 +00:00
|
|
|
CFLAGS="$ENABLE_WARNINGS -mno-cygwin"
|
|
|
|
|
|
|
|
AC_TRY_COMPILE(, [ int main () { return 0 ; } ], [
|
|
|
|
no_cygwin=yes
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
], [
|
|
|
|
no_cygwin=no
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
])
|
2010-01-22 16:40:17 +00:00
|
|
|
CFLAGS="$safe_CFLAGS"
|
2010-01-19 10:03:05 +00:00
|
|
|
|
|
|
|
if test x$no_cygwin = xyes; then
|
|
|
|
CFLAGS="${CFLAGS} -mno-cygwin"
|
|
|
|
else
|
|
|
|
AC_MSG_NOTICE([Your compiler does not understand the -mno-cygwin option.])
|
|
|
|
AC_MSG_NOTICE([You might want to select an alternative compiler, like])
|
|
|
|
AC_MSG_NOTICE([])
|
|
|
|
AC_MSG_NOTICE([CC=mingw32-gcc ./configure])
|
|
|
|
AC_MSG_NOTICE([])
|
|
|
|
fi
|
|
|
|
fi
|
2010-01-22 16:40:17 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([if linker accepts -static])
|
|
|
|
|
|
|
|
safe_LDFLAGS="$LDFLAGS"
|
|
|
|
LDFLAGS="${LDFLAGS} -static"
|
|
|
|
AC_TRY_LINK(, [ int main () { return 0 ; } ], [
|
|
|
|
can_link_static=yes
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
], [
|
|
|
|
can_link_static_cygwin=no
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
])
|
|
|
|
LDFLAGS="$safe_LDFLAGS"
|
|
|
|
|
|
|
|
if test x$can_link_static = xyes; then
|
|
|
|
LDFLAGS="${LDFLAGS} -static"
|
|
|
|
fi
|
|
|
|
|
2010-01-19 10:03:05 +00:00
|
|
|
WINDOWS_DIRS="windows"
|
|
|
|
CFLAGS="${CFLAGS} -DWIN32NATIVE"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_SUBST(WINDOWS_DIRS,$WINDOWS_DIRS)
|
|
|
|
|
2003-02-26 00:14:54 +00:00
|
|
|
AC_CONFIG_FILES([
|
2007-01-30 14:41:57 +00:00
|
|
|
doc/Makefile
|
2005-02-10 15:39:42 +00:00
|
|
|
windows/Makefile
|
|
|
|
avrdude.spec
|
|
|
|
Makefile
|
2003-02-26 00:14:54 +00:00
|
|
|
])
|
2005-02-10 14:54:57 +00:00
|
|
|
|
2005-11-01 23:02:06 +00:00
|
|
|
# The procedure to create avrdude.conf involves two steps. First,
|
|
|
|
# normal autoconf substitution will be applied, resulting in
|
|
|
|
# avrdude.conf.tmp. Finally, a sed command will be applied to filter
|
|
|
|
# out unwanted parts (currently the parallel port programmer types)
|
|
|
|
# based on previous configuration results, thereby producing the final
|
|
|
|
# avrdude.conf file.
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([avrdude.conf.tmp:avrdude.conf.in],
|
2011-12-22 19:44:37 +00:00
|
|
|
[sed $confsubst avrdude.conf.tmp > avrdude.conf],
|
|
|
|
[confsubst="$confsubst"])
|
2005-02-10 14:54:57 +00:00
|
|
|
|
2005-11-01 23:02:06 +00:00
|
|
|
AC_OUTPUT
|
2012-03-20 14:13:18 +00:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo ""
|
|
|
|
echo "Configuration summary:"
|
|
|
|
echo "----------------------"
|
|
|
|
|
|
|
|
if test x$have_libelf = xyes; then
|
|
|
|
echo "DO HAVE libelf"
|
|
|
|
else
|
|
|
|
echo "DON'T HAVE libelf"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$have_libusb = xyes; then
|
|
|
|
echo "DO HAVE libusb"
|
|
|
|
else
|
|
|
|
echo "DON'T HAVE libusb"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$have_libusb_1_0 = xyes; then
|
|
|
|
echo "DO HAVE libusb_1_0"
|
|
|
|
else
|
|
|
|
echo "DON'T HAVE libusb_1_0"
|
|
|
|
fi
|
|
|
|
|
2013-04-27 20:52:01 +00:00
|
|
|
if test x$have_libftdi1 = xyes; then
|
|
|
|
echo "DO HAVE libftdi1"
|
|
|
|
else
|
|
|
|
echo "DON'T HAVE libftdi1"
|
|
|
|
fi
|
|
|
|
|
2013-05-15 18:55:19 +00:00
|
|
|
if test x$have_libftdi = xyes; then
|
|
|
|
if test x$have_libftdi1 = xyes; then
|
|
|
|
echo "DO HAVE libftdi (but prefer to use libftdi1)"
|
|
|
|
else
|
|
|
|
echo "DO HAVE libftdi"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "DON'T HAVE libftdi"
|
|
|
|
fi
|
|
|
|
|
2012-03-20 14:13:18 +00:00
|
|
|
if test x$have_libhid = xyes; then
|
|
|
|
echo "DO HAVE libhid"
|
|
|
|
else
|
|
|
|
echo "DON'T HAVE libhid"
|
|
|
|
fi
|
2012-06-13 20:45:22 +00:00
|
|
|
|
|
|
|
if test x$have_pthread = xyes; then
|
|
|
|
echo "DO HAVE pthread"
|
|
|
|
else
|
|
|
|
echo "DON'T HAVE pthread"
|
|
|
|
fi
|
|
|
|
|
2013-01-09 19:23:30 +00:00
|
|
|
if test x$enabled_doc = xyes; then
|
|
|
|
echo "ENABLED doc"
|
|
|
|
else
|
|
|
|
echo "DISABLED doc"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enabled_parport = xyes; then
|
|
|
|
echo "ENABLED parport"
|
|
|
|
else
|
|
|
|
echo "DISABLED parport"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enabled_linuxgpio = xyes; then
|
|
|
|
echo "ENABLED linuxgpio"
|
|
|
|
else
|
|
|
|
echo "DISABLED linuxgpio"
|
|
|
|
fi
|
|
|
|
|