Mercurial > hg > octave-lojdl
changeset 9645:4531741e5236
configure tweaks
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 15 Sep 2009 13:48:39 -0400 |
parents | 080e11f1b0c1 |
children | b6f5a59a66d7 |
files | ChangeLog aclocal.m4 acx_blas.m4 acx_blas_f77_func.m4 acx_lapack.m4 acx_pthread.m4 autogen.sh configure.ac configure.in m4/Makefile.in m4/acx_blas.m4 m4/acx_blas_f77_func.m4 m4/acx_lapack.m4 m4/acx_pthread.m4 missing octMakefile.in scripts/ChangeLog scripts/Makefile.in scripts/configure.ac scripts/configure.in |
diffstat | 14 files changed, 357 insertions(+), 68 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2009-09-15 John W. Eaton <jwe@octave.org> + + * configure.ac: Rename from configure.in. + (AC_CONFIG_FILES): Add m4/Makefile to the list. + * acx_blas.m4, acx_lapack.m4, acx_blas_f77_func.m4, + acx_pthread.m4: Move to m4 subdirectory. + * m4/Makefile.in: New file. + * octMakefile.in (M4_FILES): Adjust for new m4 subdirectory. + Rename all instances of configure.in to configure.ac. + (CONF_DISTSUBDIRS, DISTSUBDIRS): Add m4 to the lists. + + * configure.in: Substitute ac_config_headers. + * octMakefile.in (CONFIG_FILES): Include @ac_config_headers@ in + the list. From Thorsten Meyer <thorsten.meyier@gmx.de>. + 2009-09-04 John W. Eaton <jwe@octave.org> * Makeconf.in (SPARSE_CPPFLAGS, SPARSE_LDFLAGS, FFTW_CPPFLAGS,
--- a/aclocal.m4 +++ b/aclocal.m4 @@ -1741,5 +1741,11 @@ fi[]dnl ])# PKG_CHECK_MODULES -############################################################################## -############################################################################## +dnl +dnl External macros. +dnl + +m4_include([m4/acx_pthread.m4]) +m4_include([m4/acx_blas.m4]) +m4_include([m4/acx_blas_f77_func.m4]) +m4_include([m4/acx_lapack.m4])
--- a/autogen.sh +++ b/autogen.sh @@ -22,7 +22,7 @@ exit 1 } -for i in `find . -name configure.in -print`; do ( +for i in `find . -name configure.ac -print`; do ( dir=`dirname $i` cd $dir pwd
rename from configure.in rename to configure.ac --- a/configure.in +++ b/configure.ac @@ -258,7 +258,6 @@ AC_SUBST(DEPEND_FLAGS) AC_SUBST(DEPEND_EXTRA_SED_PATTERN) -sinclude(acx_pthread.m4) ACX_PTHREAD AC_PATH_X @@ -885,9 +884,6 @@ ### Checks for BLAS and LAPACK libraries: # (Build subdirectories of libcruft if they aren't found on the system.) -sinclude(acx_blas.m4) -sinclude(acx_blas_f77_func.m4) -sinclude(acx_lapack.m4) ACX_BLAS_WITH_F77_FUNC([], [BLAS_DIR="blas"]) ACX_LAPACK([BLAS_LIBS="$LAPACK_LIBS $BLAS_LIBS"], [LAPACK_DIR="lapack"]) AC_SUBST(BLAS_DIR) @@ -2047,8 +2043,9 @@ fi]) AC_SUBST(ac_config_files) +AC_SUBST(ac_config_headers) -AC_CONFIG_FILES([octMakefile Makeconf test/Makefile +AC_CONFIG_FILES([octMakefile Makeconf m4/Makefile test/Makefile doc/Makefile doc/faq/Makefile doc/interpreter/Makefile doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile examples/Makefile examples/@polynomial/Makefile
new file mode 100644 --- /dev/null +++ b/m4/Makefile.in @@ -0,0 +1,62 @@ +# Makefile for octave's m4 directory +# +# Copyright (C) 2009 John W. Eaton +# +# This file is part of Octave. +# +# Octave 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 3 of the License, or (at +# your option) any later version. +# +# Octave 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 +# along with Octave; see the file COPYING. If not, see +# <http://www.gnu.org/licenses/>. + +TOPDIR = .. + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +include $(TOPDIR)/Makeconf + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ + +M4_FILES = acx_blas.m4 acx_blas_f77_func.m4 acx_lapack.m4 acx_pthread.m4 + +DISTFILES = $(addprefix $(srcdir)/, Makefile.in $(M4_FILES)) + +all: +.PHONY: all + +install install-strip: +.PHONY: install install-strip + +uninstall: +.PHONY: uninstall + +tags TAGS: +.PHONY: tags TAGS + +clean mostlyclean: +.PHONY: clean mostlyclean + +distclean: + rm -f Makefile +.PHONY: distclean + +maintainer-clean: distclean +.PHONY: maintainer-clean + +conf-dist dist: + ln $(DISTFILES) ../`cat ../.fname`/m4 +.PHONY: conf-dist dist
--- a/missing +++ b/missing @@ -1,7 +1,11 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # 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 @@ -18,14 +22,46 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi -fail_missing=false +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" -case "$1" in +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; -h|--h|--he|--hel|--help) echo "\ @@ -37,22 +73,29 @@ Options: -h, --help display this help and exit -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c - gperf + help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to <bug-automake@gnu.org>." + exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" + echo "missing $scriptversion (GNU Automake)" + exit $? ;; -*) @@ -61,103 +104,264 @@ exit 1 ;; - aclocal) +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case $1 in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." - fail_missing=true + touch aclocal.m4 ;; autoconf) echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." - fail_missing=true + touch configure ;; autoheader) echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." - fail_missing=true + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files ;; - automake) + automake*) echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." - fail_missing=true + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi ;; bison|yacc) echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." - fail_missing=true + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi ;; lex|flex) echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." - fail_missing=true + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi ;; - gperf) + help2man) echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.gperf' file. You may need the \`gperf' package - in order for those modifications to take effect. You can get - \`gperf' from any GNU archive site." - fail_missing=true +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi ;; makeinfo) echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if +WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." - fail_missing=true + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 ;; *) echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing + it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." - fail_missing=true + exit 1 ;; esac -if $fail_missing; then - echo 1>&2 "\ - - You may also need \`$1' if you obtained this package from the CVS - archive because files that can be automatically generated are not - considered source files and are not checked in to the CVS archive. +exit 0 - You may also need \`$1' if you ran make maintainer-clean and - removed files that can be automatically generated but that are - normally distributed as part of the package for convenience." - exit 1 -fi - -exit 0 +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End:
--- a/octMakefile.in +++ b/octMakefile.in @@ -36,8 +36,7 @@ INSTALL_DATA = @INSTALL_DATA@ CONF_DISTFILES = Makefile octMakefile.in Makeconf.in \ - configure configure.in config.guess config.sub aclocal.m4 \ - acx_blas.m4 acx_lapack.m4 acx_blas_f77_func.m4 \ + configure configure.ac config.guess config.sub aclocal.m4 \ config.h.in install-sh autogen.sh BUILT_DISTFILES = BUGS INSTALL.OCTAVE @@ -57,10 +56,10 @@ INSTALL_SUBDIRS = libcruft liboctave src scripts doc examples # Subdirectories in which to run `make conf-dist'. -CONF_DISTSUBDIRS = src +CONF_DISTSUBDIRS = src m4 # Subdirectories in which to run `make dist'. -DISTSUBDIRS = $(sort $(SUBDIRS) test emacs) +DISTSUBDIRS = $(sort $(SUBDIRS) test emacs m4) # Subdirectories in which to run clean targets. CLEANSUBDIRS = $(DISTSUBDIRS) @@ -74,9 +73,7 @@ SHELL_SCRIPTS = octave-bug$(SCRIPTS_EXE_SUFFIX) octave-config$(SCRIPTS_EXE_SUFFIX) \ mkoctfile$(SCRIPTS_EXE_SUFFIX) run-octave -CONFIG_FILES = @ac_config_files@ - -M4_FILES = $(wildcard *.m4) +CONFIG_FILES = @ac_config_headers@ @ac_config_files@ all: $(SHELL_SCRIPTS) $(filter-out libcruft liboctave, $(SUBDIRS)) dist-info-files @echo "" @@ -100,7 +97,9 @@ config.status: configure ./config.status --recheck -configure: configure.in $(M4_FILES) +M4_FILES = $(wildcard m4/*.m4) + +configure: configure.ac $(M4_FILES) (cd $(top_srcdir); autoconf --force) (cd $(top_srcdir); autoheader --force)
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2009-09-15 John W. Eaton <jwe@octave.org> + + * confiugre.ac: Rename from configure.in + * Makefile.in: Rename all instances of configure.in to + configure.ac. + 2009-09-11 Jaroslav Hajek <highegg@gmail.com> * optimization/Makefile.in: Include __doglegm__.m.
--- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -39,7 +39,7 @@ ALL_M_FILES := $(patsubst $(srcdir)/%, %, $(ALL_M_FILES1)) DISTFILES = $(addprefix $(srcdir)/, Makefile.in ChangeLog $(SOURCES) \ - configure.in configure mkinstalldirs mkdoc mkpkgadd gethelp.cc \ + configure.ac configure mkinstalldirs mkdoc mkpkgadd gethelp.cc \ skip-autoheader move-if-change) DOCSTRINGS SUBDIRS = audio deprecated elfun general geometry help image io \ @@ -66,7 +66,7 @@ config.status: configure ./config.status --recheck -configure: configure.in +configure: configure.ac if [ ! -f skip-autoconf ]; then autoconf --force; fi if [ ! -f skip-autoheader ]; then autoheader --force; fi