Update configure script to check for swig >= 3 (#1554)

This commit is contained in:
Jacqueline Deans 2023-08-28 13:55:17 -05:00 committed by GitHub
parent 06a1d2bf2e
commit cad2e324fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 58 additions and 27 deletions

View File

@ -2,7 +2,7 @@ dnl To generate a new top level configure script from this autoconf directory
dnl 1. aclocal
dnl 2. autoconf -o ../configure
AC_INIT([Trick],[17+])
AC_INIT([Trick],[19.6+])
AC_LANG(C++)
AC_CONFIG_AUX_DIR([autoconf])
@ -188,7 +188,7 @@ AC_SUBST([PYTHON_EXTRA_LIBS])
TR_PREPEND_PATH()
AC_PATH_PROG(GNUPLOT, gnuplot, nognuplot)
AS_IF([test "$ac_cv_path_GNUPLOT" = "nognuplot"],AC_MSG_NOTICE([could not find gnuplot]),[])
TR_SWIG_BIN([2.0])
TR_SWIG_BIN([3.0])
TR_JAVA
AX_PTHREAD()

View File

@ -6,9 +6,9 @@ AC_DEFUN([TR_SWIG_BIN],[
[
TEMP_PATH="${PATH}"
PATH="$withval:${PATH}"
AX_PKG_SWIG($1, [], [AC_MSG_ERROR([Trick requires SWIG version >= 2.0])])
AX_PKG_SWIG($1, [], [AC_MSG_ERROR([Trick requires SWIG version >= 3.0])])
PATH="${TEMP_PATH}"
],
[AX_PKG_SWIG($1, [], [AC_MSG_ERROR([Trick requires SWIG version >= 2.0])])]
[AX_PKG_SWIG($1, [], [AC_MSG_ERROR([Trick requires SWIG version >= 3.0])])]
)
])

46
configure generated vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for Trick 17+.
# Generated by GNU Autoconf 2.69 for Trick 19.6+.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Trick'
PACKAGE_TARNAME='trick'
PACKAGE_VERSION='17+'
PACKAGE_STRING='Trick 17+'
PACKAGE_VERSION='19.6+'
PACKAGE_STRING='Trick 19.6+'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1312,7 +1312,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures Trick 17+ to adapt to many kinds of systems.
\`configure' configures Trick 19.6+ to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1381,7 +1381,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of Trick 17+:";;
short | recursive ) echo "Configuration of Trick 19.6+:";;
esac
cat <<\_ACEOF
@ -1502,7 +1502,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
Trick configure 17+
Trick configure 19.6+
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -2008,7 +2008,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Trick $as_me 17+, which was
It was created by Trick $as_me 19.6+, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -5743,8 +5743,8 @@ fi
done
if test -z "$SWIG" ; then
as_fn_error $? "Trick requires SWIG version >= 2.0" "$LINENO" 5
elif test -n "2.0" ; then
as_fn_error $? "Trick requires SWIG version >= 3.0" "$LINENO" 5
elif test -n "3.0" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
$as_echo_n "checking SWIG version... " >&6; }
swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
@ -5752,7 +5752,7 @@ $as_echo_n "checking SWIG version... " >&6; }
$as_echo "$swig_version" >&6; }
if test -n "$swig_version" ; then
# Calculate the required version number components
required=2.0
required=3.0
required_major=`echo $required | sed 's/[^0-9].*//'`
if test -z "$required_major" ; then
required_major=0
@ -5792,10 +5792,10 @@ $as_echo "$swig_version" >&6; }
\+ $available_minor \* 100 \+ $available_patch`
if test $available_swig_vernum -lt $required_swig_vernum; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0 is required. You have $swig_version." >&5
$as_echo "$as_me: WARNING: SWIG version >= 2.0 is required. You have $swig_version." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 3.0 is required. You have $swig_version." >&5
$as_echo "$as_me: WARNING: SWIG version >= 3.0 is required. You have $swig_version." >&2;}
SWIG=''
as_fn_error $? "Trick requires SWIG version >= 2.0" "$LINENO" 5
as_fn_error $? "Trick requires SWIG version >= 3.0" "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
$as_echo_n "checking for SWIG library... " >&6; }
@ -5808,7 +5808,7 @@ $as_echo "$SWIG_LIB" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
SWIG=''
as_fn_error $? "Trick requires SWIG version >= 2.0" "$LINENO" 5
as_fn_error $? "Trick requires SWIG version >= 3.0" "$LINENO" 5
fi
fi
@ -5864,8 +5864,8 @@ fi
done
if test -z "$SWIG" ; then
as_fn_error $? "Trick requires SWIG version >= 2.0" "$LINENO" 5
elif test -n "2.0" ; then
as_fn_error $? "Trick requires SWIG version >= 3.0" "$LINENO" 5
elif test -n "3.0" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SWIG version" >&5
$as_echo_n "checking SWIG version... " >&6; }
swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`
@ -5873,7 +5873,7 @@ $as_echo_n "checking SWIG version... " >&6; }
$as_echo "$swig_version" >&6; }
if test -n "$swig_version" ; then
# Calculate the required version number components
required=2.0
required=3.0
required_major=`echo $required | sed 's/[^0-9].*//'`
if test -z "$required_major" ; then
required_major=0
@ -5913,10 +5913,10 @@ $as_echo "$swig_version" >&6; }
\+ $available_minor \* 100 \+ $available_patch`
if test $available_swig_vernum -lt $required_swig_vernum; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 2.0 is required. You have $swig_version." >&5
$as_echo "$as_me: WARNING: SWIG version >= 2.0 is required. You have $swig_version." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 3.0 is required. You have $swig_version." >&5
$as_echo "$as_me: WARNING: SWIG version >= 3.0 is required. You have $swig_version." >&2;}
SWIG=''
as_fn_error $? "Trick requires SWIG version >= 2.0" "$LINENO" 5
as_fn_error $? "Trick requires SWIG version >= 3.0" "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG library" >&5
$as_echo_n "checking for SWIG library... " >&6; }
@ -5929,7 +5929,7 @@ $as_echo "$SWIG_LIB" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5
$as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;}
SWIG=''
as_fn_error $? "Trick requires SWIG version >= 2.0" "$LINENO" 5
as_fn_error $? "Trick requires SWIG version >= 3.0" "$LINENO" 5
fi
fi
@ -8727,7 +8727,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by Trick $as_me 17+, which was
This file was extended by Trick $as_me 19.6+, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -8780,7 +8780,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
Trick config.status 17+
Trick config.status 19.6+
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@ -0,0 +1,30 @@
| [Home](/trick) → [Developer Docs](Developer-Docs-Home) → Configure |
|------------------------------------------------------------------|
# Updating the configure script
Trick uses `autoconf` to find and version check dependencies. The autoconf scripts live in the `autoconf/` directory, and the generated script that the user runs is `configure` in the Trick home directory.
## How to update the configure script
The configure script run by the user is generated by autoconf. To update it -
1. Make changes in the `autoconf/` directory, likely to `configure.ac` and macros in the `m4/` directory
1. From the `autoconf/` directory, run:
```
aclocal
autoconf -o ../configure
```
### Notes
If you get an error message that looks like
```
possibly undefined macro: AC_MSG_ERROR
```
Install the package `autoconf-archive`.

View File

@ -11,6 +11,7 @@ Link documentation for Trick internals, processes, and plans here.
- [Tooling and Sanitizers](Tooling-and-Sanitizers)
- [Python Environment](Python-Environment-Issues)
- [CI](CI)
- [Configure Script](Configure)
Old design documentation - may or may not be up to date