From 6b5cfc887a6b87d9bf9eb72368df50ad23b0b026 Mon Sep 17 00:00:00 2001 From: Tamas TEVESZ Date: Thu, 8 Apr 2010 21:38:03 +0200 Subject: [PATCH] Fix out-of-tree builds - The throwing out of autogen.sh in favor of autoreconf comes from http://www.gnu.org/software/automake/manual/autoconf/autoreconf-Invocation.html#autoreconf-Invocation - 'think that instead of the exit, some better way should be put in to control whether or not to automatically run configure. Or maybe just don't even run it. --- WINGs/Examples/Makefile.am | 2 +- WINGs/Extras/Makefile.am | 2 +- WINGs/Makefile.am | 2 +- WINGs/Tests/Makefile.am | 2 +- WPrefs.app/Makefile.am | 2 +- autogen.sh | 44 ++------------------------------------ configure.ac | 9 ++------ src/Makefile.am | 2 +- util/Makefile.am | 2 +- wrlib/Makefile.am | 2 +- 10 files changed, 12 insertions(+), 57 deletions(-) diff --git a/WINGs/Examples/Makefile.am b/WINGs/Examples/Makefile.am index bfd4b8dd..a8783f79 100644 --- a/WINGs/Examples/Makefile.am +++ b/WINGs/Examples/Makefile.am @@ -28,7 +28,7 @@ server_LDADD = $(top_builddir)/WINGs/libWUtil.la @LIBRARY_SEARCH_PATH@ @INTLIBS@ INCLUDES = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \ -DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG -LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) +LIBTOOL = $(QUIET) $(SHELL) $(top_builddir)/libtool $(LIBTOOL_ARG) .c.o: $(QUIET)$(COMPILE) -c $< diff --git a/WINGs/Extras/Makefile.am b/WINGs/Extras/Makefile.am index 58aeb7e3..291ed949 100644 --- a/WINGs/Extras/Makefile.am +++ b/WINGs/Extras/Makefile.am @@ -35,7 +35,7 @@ LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \ test_LDADD = wtableview.o wtabledelegates.o $(LDADD) -LIBTOOL = $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) +LIBTOOL = $(SHELL) $(top_builddir)/libtool $(LIBTOOL_ARG) .c.o: $(QUIET)$(COMPILE) -c $< diff --git a/WINGs/Makefile.am b/WINGs/Makefile.am index 5bd535da..4db12fe2 100644 --- a/WINGs/Makefile.am +++ b/WINGs/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = no-dependencies SUBDIRS = WINGs . po Documentation Resources -LIBTOOL = $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) +LIBTOOL = $(SHELL) $(top_builddir)/libtool $(LIBTOOL_ARG) libWINGs_a_AR = $(QUIET_AR) $(AR) $(ARFLAGS) diff --git a/WINGs/Tests/Makefile.am b/WINGs/Tests/Makefile.am index c838c220..f8aecd47 100644 --- a/WINGs/Tests/Makefile.am +++ b/WINGs/Tests/Makefile.am @@ -20,7 +20,7 @@ INCLUDES = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \ -DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFTFLAGS@ @HEADER_SEARCH_PATH@ \ -DDEBUG -LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) +LIBTOOL = $(QUIET) $(SHELL) $(top_builddir)/libtool $(LIBTOOL_ARG) .c.o: $(QUIET)$(COMPILE) -c $< diff --git a/WPrefs.app/Makefile.am b/WPrefs.app/Makefile.am index cf1f044a..11633815 100644 --- a/WPrefs.app/Makefile.am +++ b/WPrefs.app/Makefile.am @@ -57,7 +57,7 @@ WPrefs_LDADD = \ @XFTLIBS@ \ @INTLIBS@ -LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) +LIBTOOL = $(QUIET) $(SHELL) $(top_builddir)/libtool $(LIBTOOL_ARG) .c.o: $(QUIET)$(COMPILE) -c $< diff --git a/autogen.sh b/autogen.sh index ddeedfac..ea02ef23 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,48 +1,8 @@ #!/bin/sh -# Run this to generate all the initial makefiles, etc. -DIE=0 +autoreconf -vfi -I m4 -echo "Generating configuration files for WindowMaker, please wait...." - -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have autoconf installed to compile WindowMaker." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -(libtool --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have libtool installed to compile WindowMaker." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -(automake --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have automake installed to compile WindowMaker." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -if test "$DIE" -eq 1; then - exit 1 -fi - -echo " libtoolize --copy --force --automake" -libtoolize --copy --force --automake -echo " aclocal -I m4 $ACLOCAL_FLAGS" -aclocal -I m4 $ACLOCAL_FLAGS -echo " autoheader" -autoheader -echo " automake --add-missing --gnu --include-deps" -automake --add-missing --gnu --include-deps -echo " autoconf" -autoconf +exit 0 if [ -x config.status -a -z "$*" ]; then ./config.status --recheck diff --git a/configure.ac b/configure.ac index 6244bc7c..9a63d82c 100644 --- a/configure.ac +++ b/configure.ac @@ -14,11 +14,8 @@ dnl AC_INIT(src/WindowMaker.h) - +AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE(WindowMaker, 0.94.0-crm) - -AC_PROG_LIBTOOL - AM_CONFIG_HEADER(src/config.h) @@ -31,11 +28,9 @@ dnl Checks for programs. dnl =================== AC_ISC_POSIX AC_PROG_CC -dnl AC_PROG_MAKE_SET -- already done by AM_INIT_AUTOMAKE -#AC_PROG_RANLIB -dnl AC_PROG_INSTALL -- already done by AM_INIT_AUTOMAKE AC_PROG_LN_S AC_PROG_GCC_TRADITIONAL +AC_PROG_LIBTOOL AX_CFLAGS_GCC_OPTION(-Wall) AX_CFLAGS_GCC_OPTION(-Wextra) diff --git a/src/Makefile.am b/src/Makefile.am index ae658707..cfd04cd7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -120,7 +120,7 @@ wmaker_LDADD = \ @XLIBS@ \ @INTLIBS@ -LIBTOOL = $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) +LIBTOOL = $(SHELL) $(top_builddir)/libtool $(LIBTOOL_ARG) .c.o: $(QUIET)$(COMPILE) -c $< diff --git a/util/Makefile.am b/util/Makefile.am index 6305a411..ba4c8db4 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -73,7 +73,7 @@ wmaker.inst: $(srcdir)/wmaker.inst.in ./Makefile chmod 755 wmaker.inst -LIBTOOL = $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) +LIBTOOL = $(SHELL) $(top_builddir)/libtool $(LIBTOOL_ARG) .c.o: $(QUIET)$(COMPILE) -c $< diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am index 8b5e648d..78551cce 100644 --- a/wrlib/Makefile.am +++ b/wrlib/Makefile.am @@ -8,7 +8,7 @@ lib_LTLIBRARIES = libwraster.la libwraster_la_LDFLAGS = -version-info 4:0:1 -LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) +LIBTOOL = $(QUIET) $(SHELL) $(top_builddir)/libtool $(LIBTOOL_ARG) bin_SCRIPTS = get-wraster-flags