[sam7-util PATCH 1/2] build: update autotools to modern standards.

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Diego Elio Pettenò flameeyes at flameeyes.eu
Wed Jul 4 22:57:04 UTC 2012


This includes removing AC_CANONICAL_BUILD/AC_CANONICAL_TARGET (weren't
used), renaming configure.in to configure.ac (required for automake
1.13 coming up), moving automake options to configure.ac (removes use
of AM_INIT_AUTOMAKE with two parameters, which is also gone with
automake 1.13).

Also remove empty files and declare the system foreign, not gnu (NEWS
and AUTHORS are not used), avoid re-declaring in the distributed files
the conditional sources (automake takes care of that), and don't use
-Werror (as it would fail to build with GCC 4.6 and 4.7).

Signed-off-by: Diego Elio Pettenò <flameeyes at flameeyes.eu>
---
 Makefile.am  |    7 ++-----
 configure.ac |   43 +++++++++++++++++++++++++++++++++++++++++++
 configure.in |   46 ----------------------------------------------
 3 files changed, 45 insertions(+), 51 deletions(-)
 delete mode 100644 AUTHORS
 delete mode 100644 NEWS
 create mode 100644 configure.ac
 delete mode 100644 configure.in

diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644
index e69de29..0000000
diff --git a/Makefile.am b/Makefile.am
index ae59bd6..7d6aaf8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,4 @@
-AM_CFLAGS = -Wall -Werror
-
-AUTOMAKE_OPTIONS = gnu
+AM_CFLAGS = -Wall
 
 bin_PROGRAMS = sam7
 
@@ -22,6 +20,5 @@ endif
 noinst_HEADERS = io.h samba.h cmd.h loader128_data.h loader256_data.h 
 
 EXTRA_DIST = driver/Makefile driver/at91.c \
-	io_win32.c io_posix.c io_iokit.c io_libusb.c\
 	loader/Makefile loader/at91.h loader/bin2c.c loader/crt0.S \
-	loader/loader.c loader/loader.lds
\ No newline at end of file
+	loader/loader.c loader/loader.lds
diff --git a/NEWS b/NEWS
deleted file mode 100644
index e69de29..0000000
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..e16b1ed
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,43 @@
+AC_INIT([sam7utils], [0.2.1], [konkers at konkers.net])
+
+AC_CANONICAL_HOST
+
+AM_INIT_AUTOMAKE(foreign)
+AM_CONFIG_HEADER(config.h)
+
+AC_PROG_CC 
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+
+case "${host}" in
+     *-*-darwin* )
+       LIBS="$LIBS -framework IOKIT -framework CoreFoundation"
+       have_iokit="true"
+     ;;	    
+     *-*-cygwin* )
+       LIBS="$LIBS -lsetupapi"
+       have_win32="true"
+     ;;	    
+     * )
+       have_posix="true"
+       AC_CHECK_LIB(usb,usb_init,have_libusb="true";LIBS="$LIBS -lusb")
+       
+     ;;
+esac
+
+
+AC_HEADER_STDC
+
+AC_CHECK_LIB(readline, readline,,AC_MSG_ERROR(readline not found))
+AC_CHECK_LIB(curses, tgoto,,AC_MSG_ERROR(curses not found))
+AC_CHECK_HEADERS(stdint.h,,AC_MSG_WARN(can't find stdint.h))
+AC_CHECK_HEADERS(ctype.h,,)
+AC_CHECK_HEADERS(endian.h,,)
+
+
+AM_CONDITIONAL([HAVE_IOKIT], [test x$have_iokit = xtrue])
+AM_CONDITIONAL([HAVE_WIN32], [test x$have_win32 = xtrue])
+AM_CONDITIONAL([HAVE_POSIX], [test x$have_posix = xtrue])
+AM_CONDITIONAL([HAVE_LIBUSB],[test x$have_libusb = xtrue])
+
+AC_OUTPUT(Makefile)
diff --git a/configure.in b/configure.in
deleted file mode 100644
index 4a5a8b3..0000000
--- a/configure.in
+++ /dev/null
@@ -1,46 +0,0 @@
-AC_INIT([sam7utils], [0.2.1], [konkers at konkers.net])
-
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-AC_CANONICAL_TARGET
-
-AM_INIT_AUTOMAKE(sam7utils,0.2.1)
-AM_CONFIG_HEADER(config.h)
-
-
-AC_PROG_CC 
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
-
-case "${host}" in
-     *-*-darwin* )
-       LIBS="$LIBS -framework IOKIT -framework CoreFoundation"
-       have_iokit="true"
-     ;;	    
-     *-*-cygwin* )
-       LIBS="$LIBS -lsetupapi"
-       have_win32="true"
-     ;;	    
-     * )
-       have_posix="true"
-       AC_CHECK_LIB(usb,usb_init,have_libusb="true";LIBS="$LIBS -lusb")
-       
-     ;;
-esac
-
-
-AC_HEADER_STDC
-
-AC_CHECK_LIB(readline, readline,,AC_MSG_ERROR(readline not found))
-AC_CHECK_LIB(curses, tgoto,,AC_MSG_ERROR(curses not found))
-AC_CHECK_HEADERS(stdint.h,,AC_MSG_WARN(can't find stdint.h))
-AC_CHECK_HEADERS(ctype.h,,)
-AC_CHECK_HEADERS(endian.h,,)
-
-
-AM_CONDITIONAL([HAVE_IOKIT], [test x$have_iokit = xtrue])
-AM_CONDITIONAL([HAVE_WIN32], [test x$have_win32 = xtrue])
-AM_CONDITIONAL([HAVE_POSIX], [test x$have_posix = xtrue])
-AM_CONDITIONAL([HAVE_LIBUSB],[test x$have_libusb = xtrue])
-
-AC_OUTPUT(Makefile)
-- 
1.7.8.6





More information about the OpenBSC mailing list