This patch series modernizes various aspects of the autotools based build system. There is a lot more that could and should be done, but I tried to stay conservative for now and just resolve some of the most obvious issues. Max Horn (5): configure: replace XIPH_C_FIND_ENDIAN by AC_C_BIGENDIAN autogen.sh: replace this by a simple call to autoreconf configure: always print ac_cv_c_compiler_gnu configure: merge AC_CHECK_HEADERS calls configure: modernize autoconf usage Makefile.am | 2 - autogen.sh | 168 +-------------------------- configure.ac | 36 +++--- doc/Makefile.am | 2 - doc/html/Makefile.am | 2 - doc/html/images/Makefile.am | 2 - doc/html/images/hw/Makefile.am | 2 - doc/html/ru/Makefile.am | 2 - include/share/Makefile.am | 2 - include/share/grabbag/Makefile.am | 2 - include/test_libs_common/Makefile.am | 2 - m4/endian.m4 | 177 ----------------------------- src/libFLAC/Makefile.am | 3 + src/plugin_common/Makefile.am | 2 - src/share/getopt/Makefile.am | 2 - src/share/grabbag/Makefile.am | 2 - src/share/replaygain_analysis/Makefile.am | 2 - src/share/replaygain_synthesis/Makefile.am | 2 - src/share/utf8/Makefile.am | 2 - 19 files changed, 25 insertions(+), 389 deletions(-) delete mode 100644 m4/endian.m4 -- 1.8.0.1.525.gaaf5ad5
Max Horn
2012-Dec-12 20:33 UTC
[flac-dev] [PATCH 1/5] configure: replace XIPH_C_FIND_ENDIAN by AC_C_BIGENDIAN
Signed-off-by: Max Horn <max at quendi.de> --- configure.ac | 10 +++- m4/endian.m4 | 177 ----------------------------------------------------------- 2 files changed, 9 insertions(+), 178 deletions(-) delete mode 100644 m4/endian.m4 diff --git a/configure.ac b/configure.ac index 3899d68..f206b32 100644 --- a/configure.ac +++ b/configure.ac @@ -70,7 +70,15 @@ AC_CHECK_HEADERS([sys/param.h]) XIPH_C_BSWAP32 -XIPH_C_FIND_ENDIAN +ac_cv_c_big_endian=0 +ac_cv_c_little_endian=0 +AC_C_BIGENDIAN([ac_cv_c_big_endian=1], [ac_cv_c_little_endian=1], [ + AC_MSG_WARN([[*****************************************************************]]) + AC_MSG_WARN([[*** Not able to determine endian-ness of target processor. ]]) + AC_MSG_WARN([[*** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in ]]) + AC_MSG_WARN([[*** config.h may need to be hand editied. ]]) + AC_MSG_WARN([[*****************************************************************]]) +]) AC_DEFINE_UNQUOTED(CPU_IS_BIG_ENDIAN, ${ac_cv_c_big_endian}, [Target processor is big endian.]) AC_DEFINE_UNQUOTED(CPU_IS_LITTLE_ENDIAN, ${ac_cv_c_little_endian}, diff --git a/m4/endian.m4 b/m4/endian.m4 deleted file mode 100644 index 87c1f49..0000000 --- a/m4/endian.m4 +++ /dev/null @@ -1,177 +0,0 @@ -dnl Copyright (C) 2012 Xiph.org Foundation -dnl -dnl Redistribution and use in source and binary forms, with or without -dnl modification, are permitted provided that the following conditions -dnl are met: -dnl -dnl - Redistributions of source code must retain the above copyright -dnl notice, this list of conditions and the following disclaimer. -dnl -dnl - Redistributions in binary form must reproduce the above copyright -dnl notice, this list of conditions and the following disclaimer in the -dnl documentation and/or other materials provided with the distribution. -dnl -dnl - Neither the name of the Xiph.org Foundation nor the names of its -dnl contributors may be used to endorse or promote products derived from -dnl this software without specific prior written permission. -dnl -dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -dnl ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR -dnl CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -dnl EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -dnl PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -dnl PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -dnl LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -dnl NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -dnl @synopsis XIPH_C_FIND_ENDIAN -dnl -dnl Determine endian-ness of target processor. -dnl @version 1.1 Mar 03 2002 -dnl @author Erik de Castro Lopo <erikd at mega-nerd.com> -dnl -dnl Majority written from scratch to replace the standard autoconf macro -dnl AC_C_BIGENDIAN. Only part remaining from the original is the invocation -dnl of the AC_TRY_RUN macro. -dnl -dnl Find endian-ness in the following way: -dnl 1) Look in <endian.h>. -dnl 2) If 1) fails, look in <sys/types.h> and <sys/param.h>. -dnl 3) If 1) and 2) fails and not cross compiling run a test program. -dnl 4) If 1) and 2) fails and cross compiling then guess based on target. - -AC_DEFUN([XIPH_C_FIND_ENDIAN], -[AC_CACHE_CHECK(processor byte ordering, - ac_cv_c_byte_order, - -# Initialize to unknown -ac_cv_c_byte_order=unknown - -if test x$ac_cv_header_endian_h = xyes ; then - - # First try <endian.h> which should set BYTE_ORDER. - - [AC_TRY_LINK([ - #include <endian.h> - #if BYTE_ORDER != LITTLE_ENDIAN - not big endian - #endif - ], return 0 ;, - ac_cv_c_byte_order=little - )] - - [AC_TRY_LINK([ - #include <endian.h> - #if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif - ], return 0 ;, - ac_cv_c_byte_order=big - )] - - fi - -if test $ac_cv_c_byte_order = unknown ; then - - [AC_TRY_LINK([ - #include <sys/types.h> - #include <sys/param.h> - #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros - #endif - ], return 0 ;, - - [AC_TRY_LINK([ - #include <sys/types.h> - #include <sys/param.h> - #if BYTE_ORDER != LITTLE_ENDIAN - not big endian - #endif - ], return 0 ;, - ac_cv_c_byte_order=little - )] - - [AC_TRY_LINK([ - #include <sys/types.h> - #include <sys/param.h> - #if BYTE_ORDER != LITTLE_ENDIAN - not big endian - #endif - ], return 0 ;, - ac_cv_c_byte_order=little - )] - - )] - - fi - -if test $ac_cv_c_byte_order = unknown ; then - if test $cross_compiling = yes ; then - # This is the last resort. Try to guess the target processor endian-ness - # by looking at the target CPU type. - [ - case "$target_cpu" in - alpha* | i?86* | mipsel* | ia64*) - ac_cv_c_byte_order=little - ;; - - m68* | mips* | powerpc* | hppa* | sparc*) - ac_cv_c_byte_order=big - ;; - - esac - ] - else - AC_TRY_RUN( - [[ - int main (void) - { /* Are we little or big endian? From Harbison&Steele. */ - union - { long l ; - char c [sizeof (long)] ; - } u ; - u.l = 1 ; - return (u.c [sizeof (long) - 1] == 1); - } - ]], , ac_cv_c_byte_order=big, - ) - - AC_TRY_RUN( - [[int main (void) - { /* Are we little or big endian? From Harbison&Steele. */ - union - { long l ; - char c [sizeof (long)] ; - } u ; - u.l = 1 ; - return (u.c [0] == 1); - }]], , ac_cv_c_byte_order=little, - ) - fi - fi - -) - -if test $ac_cv_c_byte_order = big ; then - ac_cv_c_big_endian=1 - ac_cv_c_little_endian=0 -elif test $ac_cv_c_byte_order = little ; then - ac_cv_c_big_endian=0 - ac_cv_c_little_endian=1 -else - ac_cv_c_big_endian=0 - ac_cv_c_little_endian=0 - - AC_MSG_WARN([[*****************************************************************]]) - AC_MSG_WARN([[*** Not able to determine endian-ness of target processor. ]]) - AC_MSG_WARN([[*** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in ]]) - AC_MSG_WARN([[*** config.h may need to be hand editied. ]]) - AC_MSG_WARN([[*****************************************************************]]) - fi - -] -)# XIPH_C_FIND_ENDIAN -- 1.8.0.1.525.gaaf5ad5
Max Horn
2012-Dec-12 20:33 UTC
[flac-dev] [PATCH 2/5] autogen.sh: replace this by a simple call to autoreconf
The autoreconf tool is provided by autoconf to do what custom autogen.sh scripts in many projects used to do. Only it is more robust and widely tested. It has been available for several years, too. No reason to rely on custom code for this. Signed-off-by: Max Horn <max at quendi.de> --- Makefile.am | 2 - autogen.sh | 168 +---------------------------- configure.ac | 2 +- doc/Makefile.am | 2 - doc/html/Makefile.am | 2 - doc/html/images/Makefile.am | 2 - doc/html/images/hw/Makefile.am | 2 - doc/html/ru/Makefile.am | 2 - include/share/Makefile.am | 2 - include/share/grabbag/Makefile.am | 2 - include/test_libs_common/Makefile.am | 2 - src/libFLAC/Makefile.am | 3 + src/plugin_common/Makefile.am | 2 - src/share/getopt/Makefile.am | 2 - src/share/grabbag/Makefile.am | 2 - src/share/replaygain_analysis/Makefile.am | 2 - src/share/replaygain_synthesis/Makefile.am | 2 - src/share/utf8/Makefile.am | 2 - 18 files changed, 8 insertions(+), 195 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0a65206..45a0260 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,8 +28,6 @@ # distclean: remove everything except what goes in the distribution # -AUTOMAKE_OPTIONS = foreign 1.7 - ACLOCAL_AMFLAGS = -I m4 SUBDIRS = doc include m4 man src examples test build obj diff --git a/autogen.sh b/autogen.sh index 3290f2e..2aa4c30 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,166 +1,6 @@ #!/bin/sh # Run this to set up the build system: configure, makefiles, etc. -# (based on the version in enlightenment's cvs) - -# Some notes: -# -# You may need to specify -I /SOME_PATH/share/aclocal in ACLOCAL_FLAGS -# if any packages FLAC relies on (autotools, libogg, libiconv) are -# installed in non-standard places. -# -# If you don't have XMMS installed at all, you should comment out -# AM_PATH_XMMS in configure.in. -# -# FLAC uses iconv but not gettext. iconv requires config.rpath which -# is supplied by gettext, which is copied in by gettextize. But we -# can't run gettextize since we do not fulfill all it's requirements -# (because we don't use it). So you may have to: -# -# cp /usr/share/gettext/config.rpath . -# -# before running autogen.sh -# -# If you are running on OS X and get errors related to the AM_ICONV -# and/or AM_LANGINFO_CODESET macros, replace those 2 lines in -# configure.in with -# -# AC_DEFINE([HAVE_ICONV], [], [Whether we have libiconv available]) LIBICONV="-liconv" -# AC_SUBST(LIBICONV) -# -# See also http://lists.xiph.org/pipermail/flac-dev/2007-September/002384.html -# -# Also watchout, if you replace ltmain.sh, there is a bug in some -# versions of libtool (or maybe autoconf) on some platforms where the -# configure-generated libtool does not have $SED defined. See also: -# -# http://lists.gnu.org/archive/html/libtool/2003-11/msg00131.html - -package="flac" - -olddir=`pwd` -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -cd "$srcdir" -DIE=0 - -ACLOCAL_FLAGS="-I m4 $ACLOCAL_FLAGS" - -echo "checking for autoconf... " -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have autoconf installed to compile $package." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/" -VERSIONMKMAJ="sed -e s/\([0-9][0-9]*\)[^0-9].*/\\1/" -VERSIONMKMIN="sed -e s/.*[0-9][0-9]*\.//" - -# do we need automake? -if test -r Makefile.am; then - AM_OPTIONS=`fgrep AUTOMAKE_OPTIONS Makefile.am` - AM_NEEDED=`echo $AM_OPTIONS | $VERSIONGREP` - if test x"$AM_NEEDED" = "x$AM_OPTIONS"; then - AM_NEEDED="" - fi - if test -z $AM_NEEDED; then - echo -n "checking for automake... " - AUTOMAKE=automake - ACLOCAL=aclocal - if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then - echo "yes" - else - echo "no" - AUTOMAKE- fi - else - echo -n "checking for automake $AM_NEEDED or later... " - majneeded=`echo $AM_NEEDED | $VERSIONMKMAJ` - minneeded=`echo $AM_NEEDED | $VERSIONMKMIN` - for am in automake-$AM_NEEDED automake$AM_NEEDED \ - automake automake-1.7 automake-1.8 automake-1.9 automake-1.10; do - ($am --version < /dev/null > /dev/null 2>&1) || continue - ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP` - maj=`echo $ver | $VERSIONMKMAJ` - min=`echo $ver | $VERSIONMKMIN` - if test $maj -eq $majneeded -a $min -ge $minneeded; then - AUTOMAKE=$am - echo $AUTOMAKE - break - fi - done - test -z $AUTOMAKE && echo "no" - echo -n "checking for aclocal $AM_NEEDED or later... " - for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED \ - aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10; do - ($ac --version < /dev/null > /dev/null 2>&1) || continue - ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP` - maj=`echo $ver | $VERSIONMKMAJ` - min=`echo $ver | $VERSIONMKMIN` - if test $maj -eq $majneeded -a $min -ge $minneeded; then - ACLOCAL=$ac - echo $ACLOCAL - break - fi - done - test -z $ACLOCAL && echo "no" - fi - test -z $AUTOMAKE || test -z $ACLOCAL && { - echo - echo "You must have automake installed to compile $package." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - exit 1 - } -fi - -echo -n "checking for libtool... " -for LIBTOOLIZE in libtoolize glibtoolize nope; do - ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break -done -if test x$LIBTOOLIZE = xnope; then - echo "nope." - LIBTOOLIZE=libtoolize -else - echo $LIBTOOLIZE -fi -($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have libtool installed to compile $package." - echo "Download the appropriate package for your system," - echo "or get the source from one of the GNU ftp sites" - echo "listed in http://www.gnu.org/order/ftp.html" - DIE=1 -} - -if test "$DIE" -eq 1; then - exit 1 -fi - -if test -z "$*"; then - echo "I am going to run ./configure with no arguments - if you wish " - echo "to pass any to it, please specify them on the $0 command line." -fi - -if test ! -f config.rpath ; then - touch config.rpath -fi - -echo "Generating configuration files for $package, please wait...." - -echo " $ACLOCAL $ACLOCAL_FLAGS" -$ACLOCAL $ACLOCAL_FLAGS || exit 1 -echo " $LIBTOOLIZE --automake" -$LIBTOOLIZE --automake || exit 1 -echo " autoheader" -autoheader || exit 1 -echo " $AUTOMAKE --add-missing $AUTOMAKE_FLAGS" -$AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1 -echo " autoconf" -autoconf || exit 1 - -cd $olddir -$srcdir/configure "$@" && echo +# We trust that the user has a recent enough autoconf & automake setup +# (not older than a few years...) +autoreconf -i +#$srcdir/configure "$@" && echo diff --git a/configure.ac b/configure.ac index f206b32..1c936b3 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ(2.60) AC_INIT([flac], [1.2.1]) AC_CONFIG_SRCDIR([src/flac/main.c]) AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE([foreign -Wall tar-pax no-dist-gzip dist-xz subdir-objects]) +AM_INIT_AUTOMAKE([foreign 1.7 -Wall tar-pax no-dist-gzip dist-xz subdir-objects]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) user_cflags=$CFLAGS diff --git a/doc/Makefile.am b/doc/Makefile.am index 801bfd6..70fb4a1 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -15,8 +15,6 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -AUTOMAKE_OPTIONS = foreign - SUBDIRS = . html if FLaC__HAS_DOXYGEN diff --git a/doc/html/Makefile.am b/doc/html/Makefile.am index a0e89ce..1b2b336 100644 --- a/doc/html/Makefile.am +++ b/doc/html/Makefile.am @@ -15,8 +15,6 @@ # restrictive of those mentioned above. See the file COPYING.Xiph in this # distribution. -AUTOMAKE_OPTIONS = foreign - SUBDIRS = ru images docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/html diff --git a/doc/html/images/Makefile.am b/doc/html/images/Makefile.am index c793bda..a0cdb44 100644 --- a/doc/html/images/Makefile.am +++ b/doc/html/images/Makefile.am @@ -15,8 +15,6 @@ # restrictive of those mentioned above. See the file COPYING.Xiph in this # distribution. -AUTOMAKE_OPTIONS = foreign - SUBDIRS = hw docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/html/images diff --git a/doc/html/images/hw/Makefile.am b/doc/html/images/hw/Makefile.am index ae320d0..d3f12c0 100644 --- a/doc/html/images/hw/Makefile.am +++ b/doc/html/images/hw/Makefile.am @@ -15,8 +15,6 @@ # restrictive of those mentioned above. See the file COPYING.Xiph in this # distribution. -AUTOMAKE_OPTIONS = foreign - docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/html/images/hw doc_DATA = \ diff --git a/doc/html/ru/Makefile.am b/doc/html/ru/Makefile.am index 8f56aa2..0e8061d 100644 --- a/doc/html/ru/Makefile.am +++ b/doc/html/ru/Makefile.am @@ -15,8 +15,6 @@ # restrictive of those mentioned above. See the file COPYING.Xiph in this # distribution. -AUTOMAKE_OPTIONS = foreign - docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/html/ru doc_DATA = \ diff --git a/include/share/Makefile.am b/include/share/Makefile.am index 217faac..a881e77 100644 --- a/include/share/Makefile.am +++ b/include/share/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - SUBDIRS = grabbag EXTRA_DIST = \ diff --git a/include/share/grabbag/Makefile.am b/include/share/grabbag/Makefile.am index 0d520aa..22baa15 100644 --- a/include/share/grabbag/Makefile.am +++ b/include/share/grabbag/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - EXTRA_DIST = \ cuesheet.h \ file.h \ diff --git a/include/test_libs_common/Makefile.am b/include/test_libs_common/Makefile.am index a0342dc..af82b4d 100644 --- a/include/test_libs_common/Makefile.am +++ b/include/test_libs_common/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - EXTRA_DIST = \ file_utils_flac.h \ metadata_utils.h diff --git a/src/libFLAC/Makefile.am b/src/libFLAC/Makefile.am index 13ab593..aa88100 100644 --- a/src/libFLAC/Makefile.am +++ b/src/libFLAC/Makefile.am @@ -34,6 +34,9 @@ noinst_LTLIBRARIES = libFLAC-static.la if DEBUG DEBUGCFLAGS = -DFLAC__OVERFLOW_DETECT endif + +# FIXME: The following logic should be part of configure, not of Makefile.am + if FLaC__CPU_PPC # The -force_cpusubtype_ALL is needed to insert a ppc64 instruction # into cpu.c with an asm(). diff --git a/src/plugin_common/Makefile.am b/src/plugin_common/Makefile.am index 0f557fd..270416a 100644 --- a/src/plugin_common/Makefile.am +++ b/src/plugin_common/Makefile.am @@ -15,8 +15,6 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -AUTOMAKE_OPTIONS = foreign - AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include noinst_LTLIBRARIES = libplugin_common.la diff --git a/src/share/getopt/Makefile.am b/src/share/getopt/Makefile.am index 70ea506..f9a6fa3 100644 --- a/src/share/getopt/Makefile.am +++ b/src/share/getopt/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -I$(top_srcdir)/include/share noinst_LIBRARIES = libgetopt.a diff --git a/src/share/grabbag/Makefile.am b/src/share/grabbag/Makefile.am index d871b83..ada5cc8 100644 --- a/src/share/grabbag/Makefile.am +++ b/src/share/grabbag/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include noinst_LTLIBRARIES = libgrabbag.la diff --git a/src/share/replaygain_analysis/Makefile.am b/src/share/replaygain_analysis/Makefile.am index 083b5f8..ccd17a8 100644 --- a/src/share/replaygain_analysis/Makefile.am +++ b/src/share/replaygain_analysis/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -I$(top_srcdir)/include/share noinst_LTLIBRARIES = libreplaygain_analysis.la diff --git a/src/share/replaygain_synthesis/Makefile.am b/src/share/replaygain_synthesis/Makefile.am index c8de600..7b95791 100644 --- a/src/share/replaygain_synthesis/Makefile.am +++ b/src/share/replaygain_synthesis/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - SUBDIRS = include . AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -I$(top_srcdir)/include/share diff --git a/src/share/utf8/Makefile.am b/src/share/utf8/Makefile.am index 9e2c0c9..079a178 100644 --- a/src/share/utf8/Makefile.am +++ b/src/share/utf8/Makefile.am @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -AUTOMAKE_OPTIONS = foreign - AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -I$(top_srcdir)/include/share noinst_LTLIBRARIES = libutf8.la -- 1.8.0.1.525.gaaf5ad5
Max Horn
2012-Dec-12 20:33 UTC
[flac-dev] [PATCH 3/5] configure: always print ac_cv_c_compiler_gnu
Previously, we only printed whether the used compiler was detected as gcc if the answer was positive. Now we always print the result (but the GCC version still is only printed when we are using GCC) Signed-off-by: Max Horn <max at quendi.de> --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 1c936b3..abc1640 100644 --- a/configure.ac +++ b/configure.ac @@ -474,7 +474,7 @@ AC_MSG_RESULT([ Host OS : ............................. ${host_os} ]) -if test x$ac_cv_c_compiler_gnu = xyes ; then echo " Compiler is GCC : ..................... ${ac_cv_c_compiler_gnu}" +if test x$ac_cv_c_compiler_gnu = xyes ; then echo " GCC version : ......................... ${GCC_VERSION}" - fi +fi -- 1.8.0.1.525.gaaf5ad5
Max Horn
2012-Dec-12 20:33 UTC
[flac-dev] [PATCH 4/5] configure: merge AC_CHECK_HEADERS calls
Also removed some pointless AC_SUBST invocation, which would only be necessary if the Makefiles were using the results of the header detection, which they are not. Signed-off-by: Max Horn <max at quendi.de> --- configure.ac | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index abc1640..022cba8 100644 --- a/configure.ac +++ b/configure.ac @@ -59,14 +59,7 @@ AC_C_INLINE AC_C_VARARRAYS AC_C_TYPEOF -AC_CHECK_HEADERS(stdint.h) -AC_SUBST(HAVE_STDINT_H) -AC_CHECK_HEADERS(inttypes.h) -AC_SUBST(HAVE_INTTYPES_H) -AC_CHECK_HEADERS(byteswap.h) -AC_SUBST(HAVE_BYTESWAP_H) - -AC_CHECK_HEADERS([sys/param.h]) +AC_CHECK_HEADERS([stdint.h inttypes.h byteswap.h sys/param.h]) XIPH_C_BSWAP32 -- 1.8.0.1.525.gaaf5ad5
In particular: - quote several macro arguments properly - switch to the extended version of AC_INIT - replace AM_CONFIG_HEADER by AC_CONFIG_HEADERS - remove obsolete extra AC_CHECK_SIZEOF param - upgrade minimal automake version from 1.7 to 1.11 (which is when dist-xz was introduced) Signed-off-by: Max Horn <max at quendi.de> --- configure.ac | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 022cba8..5cbcbc7 100644 --- a/configure.ac +++ b/configure.ac @@ -19,10 +19,11 @@ # instead of FLAC__ since autoconf triggers off 'AC_' in strings AC_PREREQ(2.60) -AC_INIT([flac], [1.2.1]) +AC_INIT([flac], [1.2.1], [flac-dev at xiph.org], [flac], [http://flac.sourceforge.net/]) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([src/flac/main.c]) AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE([foreign 1.7 -Wall tar-pax no-dist-gzip dist-xz subdir-objects]) +AM_INIT_AUTOMAKE([foreign 1.11 -Wall tar-pax no-dist-gzip dist-xz subdir-objects]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) user_cflags=$CFLAGS @@ -39,18 +40,16 @@ AC_PROG_MAKE_SET AC_SYS_LARGEFILE AC_FUNC_FSEEKO -AC_CHECK_SIZEOF(void*,0) +AC_CHECK_SIZEOF([void*]) AC_SEARCH_LIBS([lround],[m], [AC_DEFINE(HAVE_LROUND,1,lround support)]) -#@@@ new name is AC_CONFIG_HEADERS -AM_CONFIG_HEADER(config.h) -AC_LANG_PUSH(C++) +AC_LANG_PUSH([C++]) # c++ flavor first AC_C_VARARRAYS if test $ac_cv_c_vararrays = yes; then AC_DEFINE([HAVE_CXX_VARARRAYS], 1, [Define to 1 if C++ supports variable-length arrays.]) fi -AC_LANG_POP(C++) +AC_LANG_POP([C++]) # c flavor AC_HEADER_STDC -- 1.8.0.1.525.gaaf5ad5
Max Horn
2012-Dec-12 20:37 UTC
[flac-dev] [PATCH 2/5] autogen.sh: replace this by a simple call to autoreconf
Small remark:> diff --git a/src/libFLAC/Makefile.am b/src/libFLAC/Makefile.am > index 13ab593..aa88100 100644 > --- a/src/libFLAC/Makefile.am > +++ b/src/libFLAC/Makefile.am > @@ -34,6 +34,9 @@ noinst_LTLIBRARIES = libFLAC-static.la > if DEBUG > DEBUGCFLAGS = -DFLAC__OVERFLOW_DETECT > endif > + > +# FIXME: The following logic should be part of configure, not of Makefile.am > + > if FLaC__CPU_PPC > # The -force_cpusubtype_ALL is needed to insert a ppc64 instruction > # into cpu.c with an asm().I committed this FIXME comment by mistake, although I stand by its content ;). Anyway, it logically does not really belong into this commit, so you may want to prune it before applying. Alternatively, I can also re-roll the patch series (and if I have to re-roll it anyway for other reasons, I'll remove it, too). Cheers, Max
Hi, so far I got no feedback on my patch series, nor was it merged. Did anybody have a look at it? Are there any issues that prevent them from being merged? Cheers, Max On 12.12.2012, at 21:33, Max Horn wrote:> This patch series modernizes various aspects of the autotools > based build system. There is a lot more that could and should be > done, but I tried to stay conservative for now and just resolve > some of the most obvious issues. > > Max Horn (5): > configure: replace XIPH_C_FIND_ENDIAN by AC_C_BIGENDIAN > autogen.sh: replace this by a simple call to autoreconf > configure: always print ac_cv_c_compiler_gnu > configure: merge AC_CHECK_HEADERS calls > configure: modernize autoconf usage > > Makefile.am | 2 - > autogen.sh | 168 +-------------------------- > configure.ac | 36 +++--- > doc/Makefile.am | 2 - > doc/html/Makefile.am | 2 - > doc/html/images/Makefile.am | 2 - > doc/html/images/hw/Makefile.am | 2 - > doc/html/ru/Makefile.am | 2 - > include/share/Makefile.am | 2 - > include/share/grabbag/Makefile.am | 2 - > include/test_libs_common/Makefile.am | 2 - > m4/endian.m4 | 177 ----------------------------- > src/libFLAC/Makefile.am | 3 + > src/plugin_common/Makefile.am | 2 - > src/share/getopt/Makefile.am | 2 - > src/share/grabbag/Makefile.am | 2 - > src/share/replaygain_analysis/Makefile.am | 2 - > src/share/replaygain_synthesis/Makefile.am | 2 - > src/share/utf8/Makefile.am | 2 - > 19 files changed, 25 insertions(+), 389 deletions(-) > delete mode 100644 m4/endian.m4 > > -- > 1.8.0.1.525.gaaf5ad5 > > _______________________________________________ > flac-dev mailing list > flac-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/flac-dev >
Max Horn wrote:> Hi, > > so far I got no feedback on my patch series, nor was it merged. > > Did anybody have a look at it? Are there any issues that prevent > them from being merged?Thanks for reminding me abou this one. I had applied it to my local tree and was testing it on PowerPC when I got distracted and forgot about it. I should get this tested and pushed some time in the next 12 hours. Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Maybe Matching Threads
- [PATCH 0/5] update build system
- [PATCH 2/5] autogen.sh: replace this by a simple call to autoreconf
- [PATCH] Fix building with MSYS and MinGW(-w64); Improve Makefile.lite build system
- [PATCH] Makefile.lite: Fix building with MSYS and MinGW(-w64), Improvements
- [PATCH 2/2] Update and improve autotools build