flashrom/flashrom-0001-Initial-commit-of-autotools-related-files.patch
Peter Lemenkov 68abf3998f flashrom svn ver. 1850
- Add support for Winbond W25Q40.V chips
- Add support for Macronix MX23L1654, MX23L6454 and MX23L12854 mask
ROMs
- Add support for Intel Wildcat Point PCH
- Add support for Intel Silvermont: Bay Trail, Rangeley and Avoton
- Add support for S25FL128P, S25FL129P chips
- Add support for a bunch of 29GL parallel flash chips
- Add support for Atmel AT49LH004 and AT49LH00B4
- Add new programmer for SPI EEPROMs attached to Intel 82580 NICs
- Add support for AMD Bolton chipset
- Add Board Enable for ASUS Vintage 2 PH1 (P5LD2-MQ)
- Add support for Macronix MX29F022(N)B and MX29F022(N)T
- Add support for Macronix MX25U12835F
- Add support for Sanyo LE25FW106
- Add IT8212F PCI ATA controller as programmer
- Add support for Atmel (now Adesto) AT25DL081 and AT25DL161
- Add VIA VT6421A LPC programmer driver
- Add support for ESMT F25L32PA
- Add support for Sanyo LE25FW406A
- Add support for new AMD SPI controller (SPI 100)
- Add support for Sanyo LE25FU406B
- Add support for SST25LF020A
- Add support for Spansion S25FL132K and S25FL164K
- Add support for SST25WF08
- Add support for Macronix MX23L3254 mask ROM
- Add support for TUMPA Lite
- Add support for Intel 82574L
- Add board enable for ASUS A7V8X-MX
- Add board enable for ASUS P5LD2-VM DH
- Add board enable for abit BF6
- Add support for SST25VF512A, ST25VF020, SST25VF020B chips
- Add pinout for Wiggler LPT
- Add pinout for Atmel STK200/300
- Add pinout for Altera ByteBlasterMV
- Add support for ST M50LPW080 chip
- Add an internal DMI decoder
- Add board enable for Bcom WinNET P680
- Add support for AT45CS1282 chip
- Add support for AT45DB321C
- Add support for Atmel AT45DB* chips
- Add support for Fujitsu MBM29LV160BE/TE
- Add ability to select between chips on GIGABYTE DualBIOS boards
- Temporarily disable ftdi support

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2014-09-11 22:48:57 +04:00

681 lines
20 KiB
Diff

From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 17 Sep 2010 18:58:28 +0400
Subject: [PATCH] Initial commit of autotools-related files
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..ea25e2c
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,252 @@
+sbin_PROGRAMS = flashrom
+
+man_MANS = flashrom.8
+
+# FIXME use "config.h" in the future
+DEFS += -DFLASHROM_VERSION=\"@VERSION@\" -DCONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_INTERNAL -DSTANDALONE -DCONFIG_DEFAULT_PROGRAMMER_ARGS=\"\"
+
+if HAVE_DMIDECODE
+if HAVE_DMIDECODE_EXT
+DEFS += -DCONFIG_INTERNAL_DMI=0 -DDMIDECODE_PATH=\"@DMIDECODE@\"
+else
+DEFS += -DCONFIG_INTERNAL_DMI=1 -DDMIDECODE_PATH=\"\"
+endif
+endif
+
+
+if HAVE_INTERNAL
+internal_SOURCES = \
+ board_enable.c \
+ cbtable.c \
+ coreboot_tables.h \
+ chipset_enable.c \
+ internal.c \
+ processor_enable.c
+if HAVE_X86_ONLY_INTERNAL
+internal_x86_only_SOURCES = \
+ amd_imc.c \
+ dmi.c \
+ ich_descriptors.c \
+ ich_descriptors.h \
+ ichspi.c \
+ it85spi.c \
+ it87spi.c \
+ mcp6x_spi.c \
+ sb600spi.c \
+ wbsio_spi.c
+endif
+DEFS += -DCONFIG_INTERNAL=1
+endif
+
+if HAVE_SERPROG
+serprog_SOURCES = serprog.c serprog.h
+DEFS += -DCONFIG_SERPROG=1
+endif
+
+if HAVE_LINUX_SPI
+linux_spi_SOURCES = linux_spi.c
+DEFS += -DCONFIG_LINUX_SPI=1
+endif
+
+if HAVE_RAYER_SPI
+rayer_spi_SOURCES = rayer_spi.c
+DEFS += -DCONFIG_RAYER_SPI=1
+endif
+
+if HAVE_PONY_SPI
+pony_spi_SOURCES = pony_spi.c
+DEFS += -DCONFIG_PONY_SPI=1
+endif
+
+if HAVE_BITBANG_SPI
+bitbang_spi_SOURCES = bitbang_spi.c
+DEFS += -DCONFIG_BITBANG_SPI=1
+endif
+
+if HAVE_NIC3COM
+nic3com_SOURCES = nic3com.c
+DEFS += -DCONFIG_NIC3COM=1
+endif
+
+if HAVE_GFXNVIDIA
+gfxnvidia_SOURCES = gfxnvidia.c
+DEFS += -DCONFIG_GFXNVIDIA=1
+endif
+
+if HAVE_SATASII
+satasii_SOURCES = satasii.c
+DEFS += -DCONFIG_SATASII=1
+endif
+
+if HAVE_ATAHPT
+atahpt_SOURCES = atahpt.c
+DEFS += -DCONFIG_ATAHPT=1
+endif
+
+if HAVE_ATAVIA
+atavia_SOURCES = atavia.c
+DEFS += -DCONFIG_ATAVIA=1
+endif
+
+if HAVE_IT8212
+it8212_SOURCES = it8212.c
+DEFS += -DCONFIG_IT8212=1
+endif
+
+if HAVE_FT2232_SPI
+ft_2232_spi_SOURCES = ft2232_spi.c
+DEFS += -DCONFIG_FT2232_SPI=1
+endif
+
+if HAVE_DUMMY
+dummy_SOURCES= dummyflasher.c
+DEFS += -DCONFIG_DUMMY=1
+endif
+
+if HAVE_DRKAISER
+drkaiser_SOURCES = drkaiser.c
+DEFS += -DCONFIG_DRKAISER=1
+endif
+
+if HAVE_NICREALTEK
+nicrealtek_SOURCES = nicrealtek.c
+DEFS += -DCONFIG_NICREALTEK=1
+endif
+
+if HAVE_NICNATSEMI
+nicnatsemi_SOURCES = nicnatsemi.c
+DEFS += -DCONFIG_NICNATSEMI=1
+endif
+
+if HAVE_NICINTEL
+nicintel_SOURCES = nicintel.c
+DEFS += -DCONFIG_NICINTEL=1
+endif
+
+if HAVE_NICINTEL_SPI
+nicintel_spi_SOURCES = nicintel_spi.c
+DEFS += -DCONFIG_NICINTEL_SPI=1
+endif
+
+if HAVE_NICINTEL_EEPROM
+nicintel_eeprom_SOURCES = nicintel_eeprom.c
+DEFS += -DCONFIG_NICINTEL_EEPROM=1
+endif
+
+
+if HAVE_GFXOGP
+gfxogp_SOURCES = ogp_spi.c
+DEFS += -DCONFIG_OGP_SPI=1
+endif
+
+if HAVE_BUSPIRATE_SPI
+buspirate_SOURCES = buspirate_spi.c
+DEFS += -DCONFIG_BUSPIRATE_SPI=1
+endif
+
+if HAVE_DEDIPROG
+dediprog_SOURCES = dediprog.c
+DEFS += -DCONFIG_DEDIPROG=1
+endif
+
+if HAVE_SATAMV
+satamv_SOURCES = satamv.c
+DEFS += -DCONFIG_SATAMV=1
+endif
+
+if HAVE_SERIAL
+serial_SOURCES = serial.c
+endif
+
+if HAVE_USBBLASTER_SPI
+usbblaster_SOURCES = usbblaster_spi.c
+DEFS += -DCONFIG_USBBLASTER_SPI=1
+endif
+
+if HAVE_PRINT_WIKI
+print_wiki_SOURCES = print_wiki.c
+DEFS += -DCONFIG_PRINT_WIKI=1
+endif
+
+if HAVE_PCI
+pci_SOURCES = pcidev.c \
+ physmap.c \
+ hwaccess.c \
+ hwaccess.h
+DEFS += -DNEED_PCI=1
+endif
+
+chip_SOURCES = 82802ab.c \
+ at45db.c \
+ chipdrivers.h \
+ flashchips.c \
+ flashchips.h \
+ en29lv640b.c \
+ jedec.c \
+ opaque.c \
+ sfdp.c \
+ spi.c \
+ spi.h \
+ spi25_statusreg.c \
+ spi25.c \
+ sst_fwhub.c \
+ sst28sf040.c \
+ sst49lfxxxc.c \
+ stm50.c \
+ w29ee011.c \
+ w39.c
+
+cli_SOURCES = \
+ cli_classic.c \
+ cli_common.c \
+ cli_output.c \
+ print.c
+
+lib_SOURCES = flashrom.c \
+ helpers.c \
+ layout.c \
+ programmer.c \
+ programmer.h \
+ udelay.c
+
+flashrom_SOURCES = \
+ flash.h \
+ $(internal_SOURCES) \
+ $(internal_x86_only_SOURCES) \
+ $(serprog_SOURCES) \
+ $(linux_spi_SOURCES) \
+ $(rayer_spi_SOURCES) \
+ $(pony_spi_SOURCES) \
+ $(bitbang_spi_SOURCES) \
+ $(nic3com_SOURCES) \
+ $(gfxnvidia_SOURCES) \
+ $(satasii_SOURCES) \
+ $(atahpt_SOURCES) \
+ $(atavia_SOURCES) \
+ $(it8212_SOURCES) \
+ $(ft_2232_spi_SOURCES) \
+ $(dummy_SOURCES) \
+ $(drkaiser_SOURCES) \
+ $(nicrealtek_SOURCES) \
+ $(nicnatsemi_SOURCES) \
+ $(nicintel_SOURCES) \
+ $(nicintel_eeprom_SOURCES) \
+ $(nicintel_spi_SOURCES) \
+ $(gfxogp_SOURCES) \
+ $(buspirate_SOURCES) \
+ $(dediprog_SOURCES) \
+ $(satamv_SOURCES) \
+ $(serial_SOURCES) \
+ $(usbblaster_SOURCES) \
+ $(print_wiki_SOURCES) \
+ $(pci_SOURCES) \
+ $(chip_SOURCES) \
+ $(cli_SOURCES) \
+ $(lib_SOURCES)
+
+EXTRA_DIST = COPYING Documentation README util arch.h os.h util flashrom.8.tmpl
+
+BUILT_SOURCES = flashrom.8
+
+flashrom.8: flashrom.8.tmpl
+ @sed -e '1 s#".*".*#"$(shell ./util/getrevision.sh -d flashrom.8.tmpl)" "$(VERSION)"#' <$< >$@
diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755
index 0000000..0213288
--- /dev/null
+++ b/bootstrap.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+aclocal --force
+/usr/bin/autoconf --force
+automake --add-missing --copy --force-missing
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..a8858ab
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,400 @@
+AC_INIT([flashrom], [0.9.7-r1850], [flashrom@flashrom.org], [flashrom], [http://www.flashrom.org/])
+
+AC_PREREQ(2.59)
+
+AC_CANONICAL_TARGET
+
+AC_CONFIG_SRCDIR([flashrom.c])
+AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip tar-ustar foreign])
+
+# Internal (mainboard) flashing
+AC_ARG_WITH([internal],
+ AC_HELP_STRING([--with-internal],[mainboard internal flashing support.]),
+ [internal="$withval"],[internal="yes"])
+
+# Needs to be disabled on Windows.
+AC_ARG_WITH([serprog],
+ AC_HELP_STRING([--with-serprog],[serprog support.]),
+ [serprog="$withval"],[serprog="yes"])
+
+AC_ARG_WITH([rayer_spi],
+ AC_HELP_STRING([--with-rayer-spi],[RayeR SPIPGM hardware support.]),
+ [rayer_spi="$withval"],[rayer_spi="yes"])
+
+AC_ARG_WITH([pony_spi],
+ AC_HELP_STRING([--with-pony-spi],[PonyProg2000 SPI hardware support.]),
+ [pony_spi="$withval"],[pony_spi="yes"])
+
+AC_ARG_WITH([nic3com],
+ AC_HELP_STRING([--with-nic3com],[3Com NICs support.]),
+ [nic3com="$withval"],[nic3com="yes"])
+
+AC_ARG_WITH([gfxnvidia],
+ AC_HELP_STRING([--with-gfxnvidia],[NVIDIA graphics cards support. Note: write and erase do not work properly.]),
+ [gfxnvidia="$withval"],[gfxnvidia="yes"])
+
+AC_ARG_WITH([satasii],
+ AC_HELP_STRING([--with-satasii],[SiI SATA controllers support.]),
+ [satasii="$withval"],[satasii="yes"])
+
+AC_ARG_WITH([atahpt],
+ AC_HELP_STRING([--with-atahpt],[Highpoint (HPT) ATA/RAID controller support. IMPORTANT: This code is not yet working!]),
+ [atahpt="$withval"],[atahpt="no"])
+
+AC_ARG_WITH([atavia],
+ AC_HELP_STRING([--with-atavia],[VIA VT6421A LPC programmer support.]),
+ [atavia="$withval"],[atavia="no"])
+
+AC_ARG_WITH([it8212],
+ AC_HELP_STRING([--with-it8212],[Innovision Multimedia IT8212F PCI PATA/RAID controller support.]),
+ [it8212="$withval"],[it8212="no"])
+
+AC_ARG_WITH([ft2232_spi],
+ AC_HELP_STRING([--with-ft2232-spi],[FT2232 SPI dongles support.]),
+ [ft2232_spi="$withval"],[ft2232_spi="yes"])
+
+AC_ARG_WITH([dummy],
+ AC_HELP_STRING([--with-dummy],[dummy flashing support.]),
+ [dummy="$withval"],[dummy="yes"])
+
+AC_ARG_WITH([drkaiser],
+ AC_HELP_STRING([--with-drkaiser],[Dr. Kaiser support.]),
+ [drkaiser="$withval"],[drkaiser="yes"])
+
+AC_ARG_WITH([nicrealtek],
+ AC_HELP_STRING([--with-nicrealtek],[Realtek NICs support.]),
+ [nicrealtek="$withval"],[nicrealtek="yes"])
+
+AC_ARG_WITH([nicnatsemi],
+ AC_HELP_STRING([--with-nicnatsemi],[National Semiconductor NICs support. Incomplete and untested.]),
+ [nicnatsemi="$withval"],[nicnatsemi="no"])
+
+AC_ARG_WITH([nicintel],
+ AC_HELP_STRING([--with-nicintel],[Intel NICs support.]),
+ [nicintel="$withval"],[nicintel="yes"])
+
+AC_ARG_WITH([nicintel_spi],
+ AC_HELP_STRING([--with-nicintel-spi],[SPI on Intel NICs support.]),
+ [nicintel_spi="$withval"],[nicintel_spi="yes"])
+
+AC_ARG_WITH([nicintel_eeprom],
+ AC_HELP_STRING([--with-nicintel-eeprom],[EEPROM on Intel NICs support.]),
+ [nicintel_eeprom="$withval"],[nicintel_eeprom="yes"])
+
+
+AC_ARG_WITH([gfxogp],
+ AC_HELP_STRING([--with-gfxogp],[The Open Graphics Project graphics card support.]),
+ [gfxogp="$withval"],[gfxogp="yes"])
+
+AC_ARG_WITH([buspirate_spi],
+ AC_HELP_STRING([--with-buspirate-spi],[Bus Pirate SPI support.]),
+ [buspirate_spi="$withval"],[buspirate_spi="yes"])
+
+AC_ARG_WITH([usbblaster_spi],
+ AC_HELP_STRING([--with-usbblaster-spi],[Altera USB-Blaster dongles support.]),
+ [usbblaster_spi="$withval"],[usbblaster_spi="yes"])
+
+AC_ARG_WITH([dediprog],
+ AC_HELP_STRING([--with-dediprog],[Dediprog SF100 support. Incomplete and untested.]),
+ [dediprog="$withval"],[dediprog="no"])
+
+AC_ARG_WITH([satamv],
+ AC_HELP_STRING([--with-satamv],[Marvell SATA controllers support.]),
+ [satamv="$withval"],[satamv="yes"])
+
+AC_ARG_WITH([dmidecode],
+ AC_HELP_STRING([--with-dmidecode],[Enable dmidecode (only for x86/x86_64).]),
+ [dmidecode="$withval"],[dmidecode="yes"])
+AC_ARG_WITH([dmidecode_ext],
+ AC_HELP_STRING([--with-dmidecode-external],[Use external dmidecode utility instead of internal one (only for x86/x86_64).]),
+ [dmidecode_ext="$withval"],[dmidecode_ext="yes"])
+
+# Specific for Flashrom Wiki
+AC_ARG_WITH([print_wiki],
+ AC_HELP_STRING([--with-print-wiki],[enable wiki export support. It is only useful if you have Flashrom wiki access.]),
+ [print_wiki="$withval"],[print_wiki="no"])
+
+AC_C_BIGENDIAN(
+ [AC_DEFINE([__FLASHROM_BIG_ENDIAN__], [1], [Big endian])],
+ [AC_DEFINE([__FLASHROM_LITTLE_ENDIAN__], [1], [Little endian])],
+ [AC_MSG_ERROR([Unknown endianness])],
+ [AC_MSG_ERROR([No support for universal binaries yet])]
+ )
+
+# Check for CPU-specific features
+case "$target_cpu" in
+ i386|i486|i586|i686|i786|x86_64)
+ if test "$internal" = 'yes'; then
+ enable_x86_only_internal="yes"
+ else
+ enable_x86_only_internal="no"
+ fi
+
+ AC_CHECK_HEADERS([sys/io.h])
+
+ if test "$dmidecode_ext" = 'yes'; then
+ AC_PATH_PROG([DMIDECODE], dmidecode, [], [$PATH$PATH_SEPARATOR/usr/sbin])
+ fi
+
+ ;;
+ mips*|power*|arm*)
+ enable_x86_only_internal="n/a"
+ if test "$nic3com" = 'yes'; then
+ AC_MSG_WARN([NIC 3Com is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.])
+ nic3com="no"
+ fi
+ if test "$nicnatsemi" = 'yes'; then
+ AC_MSG_WARN([NIC NatSemi is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.])
+ nicnatsemi="no"
+ fi
+ if test "$nicrealtek" = 'yes'; then
+ AC_MSG_WARN([NIC Realtek is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.])
+ nicrealtek="no"
+ fi
+ if test "$rayer_spi" = 'yes'; then
+ AC_MSG_WARN([RayeR SPIPGM is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.])
+ rayer_spi="no"
+ fi
+ if test "$satamv" = 'yes'; then
+ AC_MSG_WARN([Marvell SATA is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet])
+ satamv="no"
+ fi
+ if test "$atahpt" = 'yes'; then
+ AC_MSG_WARN([Highpoint (HPT) ATA/RAID controller support is not supported for this target ($target_cpu). No PCI port I/O access on this architecture yet.])
+ atahpt="no"
+ fi
+ if test "$dmidecode" = 'yes' -o "$dmidecode_ext" = 'yes' ; then
+ AC_MSG_WARN([DMI handling is not supported for this target ($target_cpu).])
+ dmidecode="no"
+ dmidecode_ext=""
+ fi
+ ;;
+ *)
+ AC_MSG_ERROR([No support for this CPU ($target_cpu) yet])
+ ;;
+esac
+
+# Enable OS-specific compilation flags
+case "$target_os" in
+ linux*)
+ AC_CHECK_HEADERS([sys/ioctl.h])
+ AC_ARG_WITH(
+ [linux_spi],
+ AC_HELP_STRING([--with-linux-spi],[Linux SPI subsystem support.]),
+ [linux_spi="$withval"],
+ [linux_spi="yes"]
+ )
+ if test "$linux_spi" = "yes" ; then
+ AC_CHECK_HEADERS([linux/types.h], [], [AC_MSG_ERROR([<linux/types.h> not found])], [])
+ AC_CHECK_HEADERS([linux/spi/spidev.h], [], [AC_MSG_ERROR([<linux/spi/spidev.h> not found])], [])
+ fi
+ ;;
+ darwin*)
+ linux_spi="n/a"
+ AC_CHECK_HEADERS([DirectIO/darwinio.h DirectHW/DirectHW.h])
+ ;;
+ freebsd*)
+ linux_spi="n/a"
+ AC_CHECK_HEADERS([machine/cpufunc.h])
+ ;;
+ openbsd*)
+ linux_spi="n/a"
+ AC_CHECK_HEADERS([machine/sysarch.h sys/types.h])
+ ;;
+ netbsd*)
+ linux_spi="n/a"
+ AC_CHECK_HEADERS([machine/sysarch.h sys/types.h])
+ ;;
+ *solaris*)
+ linux_spi="n/a"
+ AC_CHECK_HEADERS([asm/sunddi.h strings.h sys/psw.h sys/sysi86.h])
+ ;;
+ mingw*)
+ linux_spi="n/a"
+ # MinGW doesn't have the ffs() function, but we can use gcc's __builtin_ffs().
+ CFLAGS="$CFLAGS -Dffs=__builtin_ffs"
+ # Some functions provided by Microsoft do not work as described in C99 specifications. This macro fixes that
+ # for MinGW. See http://sourceforge.net/apps/trac/mingw-w64/wiki/printf%20and%20scanf%20family */
+ CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO=1"
+ ;;
+ *djgpp*)
+ linux_spi="n/a"
+ AC_CHECK_HEADERS([pc.h])
+ # DJGPP has odd uint*_t definitions which cause lots of format string warnings.
+ CFLAGS="$CFLAGS -Wno-format"
+ ;;
+ *)
+ AC_MSG_ERROR([No support for this OS ($target_os) yet])
+ ;;
+esac
+
+# Check whether we need serial support
+if test "$serprog" = 'yes' -o \
+ "$buspirate_spi" = 'yes' -o \
+ "$pony_spi" = 'yes' ; then
+ serial="yes"
+else
+ serial="no"
+fi
+
+# Check whether we need PCI support
+if test "$internal" = 'yes' -o \
+ "$rayer_spi" = 'yes' -o \
+ "$nic3com" = 'yes' -o \
+ "$gfxnvidia" = 'yes' -o \
+ "$satasii" = 'yes' -o \
+ "$atahpt" = 'yes' -o \
+ "$atavia" = 'yes' -o \
+ "$it8212" = 'yes' -o \
+ "$drkaiser" = 'yes' -o \
+ "$nicrealtek" = 'yes' -o \
+ "$nicnatsemi" = 'yes' -o \
+ "$nicintel" = 'yes' -o \
+ "$nicintel_spi" = 'yes' -o \
+ "$nicintel_eeprom" = 'yes' -o \
+ "$gfxogp" = 'yes' -o \
+ "$satamv" = 'yes' ; then
+ pci="yes"
+fi
+
+if test "$rayer_spi" = 'yes' -o \
+ "$pony_spi" = 'yes' -o \
+ "$internal" = 'yes' -o \
+ "$nicintel_spi" = 'yes' -o \
+ "$gfxogp" = 'yes' ; then
+ bitbang_spi="yes"
+else
+ bitbang_spi="no"
+fi
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+
+# Checks for header files.
+AC_CHECK_HEADERS([limits.h stddef.h stdint.h stdlib.h string.h sys/time.h sys/utsname.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_INLINE
+AC_TYPE_OFF_T
+AC_TYPE_SIZE_T
+AC_CHECK_SIZEOF(int)
+dnl mingw (for instance) lacks ssize_t
+AC_CHECK_TYPE(ssize_t, int)
+AC_CHECK_TYPE(uint8_t, unsigned char)
+AC_CHECK_TYPE(uint16_t, unsigned short)
+AC_CHECK_TYPE(uint64_t, unsigned long long)
+if test $ac_cv_sizeof_int -eq 4 ; then
+AC_CHECK_TYPE(uint32_t, unsigned int)
+elif test $ac_cv_size_long -eq 4 ; then
+AC_CHECK_TYPE(uint32_t, unsigned long)
+else
+AC_MSG_ERROR([no 32-bit type found])
+fi
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+AC_FUNC_MMAP
+AC_FUNC_REALLOC
+AC_CHECK_FUNCS([getpagesize gettimeofday memmove memset munmap strcasecmp strchr strcspn strdup strerror strncasecmp strspn strstr strtol strtoul uname])
+
+# Checks for pcilib
+if test "$pci" = 'yes' ; then
+ AC_CHECK_LIB([pci], [pci_alloc],,[AC_MSG_ERROR([pci library missing])])
+fi
+
+# check for socket (required for SunOS)
+if test "$serprog" = 'yes' ; then
+ AC_CHECK_LIB([socket], [socket])
+ AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h sys/socket.h termios.h unistd.h])
+ AC_CHECK_FUNCS([gethostbyaddr gethostbyname socket])
+fi
+
+# Check for libusb
+if test "$dediprog" = 'yes' -o "$ft2232_spi" = 'yes' ; then
+ AC_CHECK_LIB([usb], [usb_init])
+fi
+
+if test "$ft2232_spi" = 'yes' -o "$usbblaster_spi" = 'yes' ; then
+ AC_CHECK_HEADERS([ftdi.h],[],[AC_MSG_ERROR([<ftdi.h> header not found])],[AC_INCLUDES_DEFAULT])
+ AC_CHECK_LIB([ftdi],[ftdi_init],,[AC_MSG_ERROR([ftdi library is missing])])
+fi
+
+# For Makefile.am
+AM_CONDITIONAL(HAVE_INTERNAL, test "$internal" = "yes")
+AM_CONDITIONAL(HAVE_DMIDECODE, test "$dmidecode" = "yes")
+AM_CONDITIONAL(HAVE_DMIDECODE_EXT, test "$DMIDECODE" != "")
+AM_CONDITIONAL(HAVE_X86_ONLY_INTERNAL, test "$enable_x86_only_internal" = "yes")
+AM_CONDITIONAL(HAVE_SERPROG, test "$serprog" = "yes")
+AM_CONDITIONAL(HAVE_LINUX_SPI, test "$linux_spi" = "yes")
+AM_CONDITIONAL(HAVE_RAYER_SPI, test "$rayer_spi" = "yes")
+AM_CONDITIONAL(HAVE_PONY_SPI, test "$pony_spi" = "yes")
+AM_CONDITIONAL(HAVE_BITBANG_SPI, test "$bitbang_spi" = "yes")
+AM_CONDITIONAL(HAVE_NIC3COM, test "$nic3com" = "yes")
+AM_CONDITIONAL(HAVE_GFXNVIDIA, test "$gfxnvidia" = "yes")
+AM_CONDITIONAL(HAVE_SATASII, test "$satasii" = "yes")
+AM_CONDITIONAL(HAVE_ATAHPT, test "$atahpt" = "yes")
+AM_CONDITIONAL(HAVE_ATAVIA, test "$atavia" = "yes")
+AM_CONDITIONAL(HAVE_IT8212, test "$it8212" = "yes")
+AM_CONDITIONAL(HAVE_FT2232_SPI, test "$ft2232_spi" = "yes")
+AM_CONDITIONAL(HAVE_DUMMY, test "$dummy" = "yes")
+AM_CONDITIONAL(HAVE_DRKAISER, test "$drkaiser" = "yes")
+AM_CONDITIONAL(HAVE_NICREALTEK, test "$nicrealtek" = "yes")
+AM_CONDITIONAL(HAVE_NICNATSEMI, test "$nicnatsemi" = "yes")
+AM_CONDITIONAL(HAVE_NICINTEL, test "$nicintel" = "yes")
+AM_CONDITIONAL(HAVE_NICINTEL_SPI, test "$nicintel_spi" = "yes")
+AM_CONDITIONAL(HAVE_NICINTEL_EEPROM, test "$nicintel_eeprom" = "yes")
+AM_CONDITIONAL(HAVE_GFXOGP, test "$gfxogp" = "yes")
+AM_CONDITIONAL(HAVE_BUSPIRATE_SPI, test "$buspirate_spi" = "yes")
+AM_CONDITIONAL(HAVE_USBBLASTER_SPI, test "$usbblaster_spi" = "yes")
+AM_CONDITIONAL(HAVE_DEDIPROG, test "$dediprog" = "yes")
+AM_CONDITIONAL(HAVE_SATAMV, test "$satamv" = "yes")
+AM_CONDITIONAL(HAVE_SERIAL, test "$serial" = "yes")
+AM_CONDITIONAL(HAVE_PCI, test "$pci" = "yes")
+AM_CONDITIONAL(HAVE_PRINT_WIKI, test "$print_wiki" = "yes")
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+
+AC_MSG_RESULT([
+------------------------------------------------------------------------
+ $PACKAGE $VERSION configuration.
+
+ Compiler support:
+
+ Target CPU: ................... ${target_cpu}
+ Target OS: .................... ${target_os}
+
+ Suppored programmers:
+
+ Internal: ..................... ${internal}
+ x86-only features: .......... ${enable_x86_only_internal}
+ serprog: ...................... ${serprog}
+ Linux SPI: .................... ${linux_spi}
+ RayeR SPI: .................... ${rayer_spi}
+ PonyProg2000 SPI: ............. ${pony_spi}
+ Bitbang SPI: .................. ${bitbang_spi}
+ 3COM NIC: ..................... ${nic3com}
+ NVIDIA GFX: ................... ${gfxnvidia}
+ Silicon Image SATA: ........... ${satasii}
+ Highpoint ATA: ................ ${atahpt}
+ VIA VT6421A LPC: .............. ${atavia}
+ IT8212F PCI PATA/RAID: ........ ${it8212}
+ FT232 SPI: .................... ${ft2232_spi}
+ Dummy: ........................ ${dummy}
+ Dr. Kaiser: ................... ${drkaiser}
+ Realtek NIC: .................. ${nicrealtek}
+ National Semiconductor NIC: ... ${nicnatsemi}
+ Intel NIC: .................... ${nicintel}
+ Intel NIC SPI: ................ ${nicintel_spi}
+ Intel NIC EEPROM: ............. ${nicintel_eeprom}
+ Open Graphics Project GFX: .... ${gfxogp}
+ Bus Pirate SPI: ............... ${buspirate_spi}
+ Altera USB-Blaster SPI: ....... ${usbblaster_spi}
+ Dediprog SF100: ............... ${dediprog}
+ Marvell SATA: ................. ${satamv}
+ Serial: ....................... ${serial}
+
+------------------------------------------------------------------------
+])