Skip to content

Commit

Permalink
configure: fix some autoconf-2.69 update issues (#1870)
Browse files Browse the repository at this point in the history
- Rename configure.in (obsolete with autoconf-2.70) to configure.ac
- No need to set AC_CONFIG_AUX_DIR, default will do
- Remove double quote on macro 'LOC_FP_TEST'
  • Loading branch information
nilason committed Sep 16, 2021
1 parent 7940e83 commit 50e7736
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 42 deletions.
2 changes: 1 addition & 1 deletion aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ int main(void) {

AC_DEFUN([LOC_CHECK_FP_INF_NAN],[
AC_MSG_CHECKING([for full floating-point support]$1)
AC_RUN_IFELSE([AC_LANG_SOURCE([[LOC_FP_TEST]])],[ AC_MSG_RESULT(yes)
AC_RUN_IFELSE([AC_LANG_SOURCE([LOC_FP_TEST])],[ AC_MSG_RESULT(yes)
$2],[ AC_MSG_RESULT(no)
$3],[ AC_MSG_RESULT([unknown (cross-compiling)])
$4
Expand Down
58 changes: 23 additions & 35 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ PACKAGE_STRING=
PACKAGE_BUGREPORT=
PACKAGE_URL=

ac_unique_file="configure.in"
ac_unique_file="configure.ac"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
Expand Down Expand Up @@ -3607,7 +3607,17 @@ CFLAGS=${ac_save_cflags}
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
LOC_FP_TEST
#include <float.h>
int main(void) {
double one = 1.0;
double zero = 0.0;
if (one/zero > DBL_MAX) /* infinity */
if (zero/zero != zero/zero) /* NaN */
return 0;
return 1;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Expand All @@ -3629,7 +3639,17 @@ $as_echo "unknown (cross-compiling)" >&6; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
LOC_FP_TEST
#include <float.h>
int main(void) {
double one = 1.0;
double zero = 0.0;
if (one/zero > DBL_MAX) /* infinity */
if (zero/zero != zero/zero) /* NaN */
return 0;
return 1;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Expand Down Expand Up @@ -3746,38 +3766,6 @@ fi



# Use absolute path for aux directory so that install-sh works

ac_aux_dir=
for ac_dir in "$SRCDIR" "$srcdir"/"$SRCDIR"; do
if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f "$ac_dir/install.sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
elif test -f "$ac_dir/shtool"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$SRCDIR\" \"$srcdir\"/\"$SRCDIR\"" "$LINENO" 5
fi

# These three variables are undocumented and unsupported,
# and are intended to be withdrawn in a future Autoconf release.
# They can cause serious problems if a builder's source tree is in a directory
# whose full name contains unusual characters.
ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.



# Set GISBASE and GRASS_BIN

GISBASE="${WINDSTDIR}/dist.${ARCH}"
Expand Down
6 changes: 1 addition & 5 deletions configure.in → configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $2
])

AC_INIT
AC_CONFIG_SRCDIR([configure.in])
AC_CONFIG_SRCDIR([configure.ac])
AC_PREREQ([2.69])
AC_CONFIG_HEADER(include/config.h)
AC_CANONICAL_HOST
Expand Down Expand Up @@ -102,10 +102,6 @@ fi

AC_SUBST(ARCH)

# Use absolute path for aux directory so that install-sh works

AC_CONFIG_AUX_DIR("$SRCDIR")

# Set GISBASE and GRASS_BIN

GISBASE="${WINDSTDIR}/dist.${ARCH}"
Expand Down
2 changes: 1 addition & 1 deletion lib/gis/compress.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/* adding a new compressor:
* add the corresponding functions G_*compress() and G_*_expand()
* if needed, add checks to configure.in and include/config.in
* if needed, add checks to configure.ac and include/config.h.in
* modify compress.h (this file)
* nothing to change in compress.c
*/
Expand Down

0 comments on commit 50e7736

Please sign in to comment.