Ver código fonte

configure: upgrade to autoconf 2.69 (#1845)

nilason 2 anos atrás
pai
commit
dca9364c64

+ 49 - 71
aclocal.m4

@@ -122,7 +122,7 @@ ac_save_libs="$LIBS"
 AC_MSG_CHECKING(for $4 library)
 LDFLAGS="$5 $LDFLAGS"
 LIBS="-l$1 $7 $8"
-AC_TRY_LINK([$2],[$3],[
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])],[
 AC_MSG_RESULT(found)
 $6="$$6 -l$1 $8"
 ],[
@@ -214,7 +214,7 @@ AC_DEFUN([LOC_CHECK_VERSION_STRING],[
 AC_MSG_CHECKING($3 version)
 ac_save_cppflags="$CPPFLAGS"
 CPPFLAGS="$5 $CPPFLAGS"
-AC_TRY_RUN([
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <stdio.h> 
 #include <$1>
 int main(void) {
@@ -222,11 +222,8 @@ int main(void) {
  fputs($2, fp);
  return 0;
 }
-],
-[   $4=`cat conftestdata`
-    AC_MSG_RESULT($$4)],
-[   AC_MSG_ERROR([*** Could not determine $3 version.]) ],
-[   $4=$6
+]])],[   $4=`cat conftestdata`
+    AC_MSG_RESULT($$4)],[   AC_MSG_ERROR([*** Could not determine $3 version.]) ],[   $4=$6
     AC_MSG_RESULT([unknown (cross-compiling)]) ])
 CPPFLAGS=$ac_save_cppflags
 ])
@@ -241,7 +238,7 @@ AC_DEFUN([LOC_CHECK_VERSION_INT],[
 AC_MSG_CHECKING($3 version)
 ac_save_cppflags="$CPPFLAGS"
 CPPFLAGS="$5 $CPPFLAGS"
-AC_TRY_RUN([
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <$1>
 int main(void) {
@@ -249,11 +246,8 @@ int main(void) {
  fprintf(fp, "%d", $2);
  return 0;
 }
-    ],
-    [   $4=`cat conftestdata`
-        AC_MSG_RESULT($$4)],
-    [   AC_MSG_ERROR([*** Could not determine $3 version.]) ],
-    [   $4=$6
+    ]])],[   $4=`cat conftestdata`
+        AC_MSG_RESULT($$4)],[   AC_MSG_ERROR([*** Could not determine $3 version.]) ],[   $4=$6
         AC_MSG_RESULT([unknown (cross-compiling)]) ])
 CPPFLAGS=$ac_save_cppflags
 ])
@@ -261,7 +255,7 @@ CPPFLAGS=$ac_save_cppflags
 dnl autoconf undefines "eval", so use "builtin([eval], ...)"
 
 AC_DEFUN([LOC_PAD],[$1[]ifelse(builtin([eval],len($1) > 23),1,[
-                          ],substr([                        ],len($1)))])
+                          ],m4_substr([                        ],len($1)))])
 
 AC_DEFUN([LOC_ARG_WITH],[
 AC_ARG_WITH($1,
@@ -322,14 +316,11 @@ int main(void) {
 
 AC_DEFUN([LOC_CHECK_FP_INF_NAN],[
 AC_MSG_CHECKING([for full floating-point support]$1)
-AC_TRY_RUN(LOC_FP_TEST,
-[   AC_MSG_RESULT(yes)
-    $2],
-[   AC_MSG_RESULT(no)
-    $3],
-[   AC_MSG_RESULT([unknown (cross-compiling)])
-    $4]
-)
+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
+])
 ])
 
 dnl check whether the compiler supports the -mieee switch
@@ -338,10 +329,8 @@ AC_DEFUN([LOC_CHECK_CC_MIEEE],[
 AC_MSG_CHECKING(whether "cc -mieee" works)
 ac_save_cflags=${CFLAGS}
 CFLAGS="$CFLAGS -mieee"
-AC_TRY_COMPILE(,,
-    [   AC_MSG_RESULT(yes)
-        IEEEFLAG="-mieee"],
-    [   AC_MSG_RESULT(no)])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[   AC_MSG_RESULT(yes)
+        IEEEFLAG="-mieee"],[   AC_MSG_RESULT(no)])
 CFLAGS=${ac_save_cflags}
 ])
 
@@ -349,16 +338,23 @@ AC_DEFUN([LOC_MSG],[
 echo "$1"
 ])
 
-AC_DEFUN([LOC_PAD_26],[substr([                           ],len($1))])
+AC_DEFUN([LOC_PAD_26],[m4_substr([                           ],len($1))])
 
 AC_DEFUN([LOC_YES_NO],[if test -n "${$1}" ; then echo yes ; else echo no ; fi])
 
 AC_DEFUN([LOC_MSG_USE],[
 [echo "  $1:]LOC_PAD_26($1)`LOC_YES_NO($2)`"])
 
-AC_DEFUN(LOC_EXEEXT,
-[AC_REQUIRE([AC_CYGWIN])
-AC_REQUIRE([AC_MINGW32])
+AC_DEFUN(LOC_EXEEXT,[
+[case $host_os in
+  *cygwin* ) CYGWIN=yes;;
+esac
+]
+
+[case $host_os in
+  *mingw32* ) MINGW32=yes;;
+esac
+]
 AC_MSG_CHECKING([for executable suffix])
 AC_CACHE_VAL(ac_cv_exeext,
 [if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
@@ -414,7 +410,7 @@ AC_DEFUN([SC_ENABLE_SHARED], [
     else
 	AC_MSG_RESULT([static])
 	SHARED_BUILD=0
-	AC_DEFINE(STATIC_BUILD)
+	AC_DEFINE(STATIC_BUILD, 1, [define for Windows static build])
 	GRASS_LIBRARY_TYPE='stlib'
     fi
     AC_SUBST(GRASS_LIBRARY_TYPE)
@@ -517,8 +513,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
 	*-sun-solaris*)
 	    # Note: If _REENTRANT isn't defined, then Solaris
 	    # won't define thread-safe library routines.
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+	    AC_DEFINE(_REENTRANT, 1, [define _REENTRANT flag (for SunOS)])
+	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [enable threading extensions on Solaris])
 	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
 	    # symbols when dynamically loaded into tclsh.
             if test "$GCC" = "yes" ; then
@@ -540,8 +536,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
 	    #       derives from UNIX System V Release 4
 	    # Note: If _REENTRANT isn't defined, then Solaris
 	    # won't define thread-safe library routines.
-	    AC_DEFINE(_REENTRANT)
-	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+	    AC_DEFINE(_REENTRANT, 1, [define _REENTRANT flag (for SunOS)])
+	    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [enable threading extensions on Solaris])
 	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
 	    # symbols when dynamically loaded into tclsh.
             if test "$GCC" = "yes" ; then
@@ -570,8 +566,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
 	    # TODO: add optional pthread support with any combination of: 
 	    # CFLAGS="$CFLAGS -pthread"
 	    # LDFLAGS="$LDFLAGS -lpthread"
-	    # AC_DEFINE(_REENTRANT)
-	    # AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+	    # AC_DEFINE(_REENTRANT, 1, [define _REENTRANT flag (for SunOS)])
+	    # AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [enable threading extensions on Solaris])
 	    ;;
 	*-netbsd*)
 	    # NetBSD has ELF.
@@ -591,8 +587,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
 	    # TODO: add optional pthread support with any combination of: 
 	    # CFLAGS="$CFLAGS -pthread"
 	    # LDFLAGS="$LDFLAGS -lpthread"
-	    # AC_DEFINE(_REENTRANT)
-	    # AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+	    # AC_DEFINE(_REENTRANT, 1, [define _REENTRANT flag (for SunOS)])
+	    # AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [enable threading extensions on Solaris])
 	    ;;
 	*aix*)
 		# NOTE: do we need to support aix < 6 ?
@@ -676,14 +672,9 @@ dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR, COMMENT, INCLUDES, F
 AC_DEFUN([AC_SYS_LARGEFILE_MACRO_VALUE],
   [AC_CACHE_CHECK([for $1 value needed for large files], $3,
      [$3=no
-      AC_TRY_COMPILE([$5],
-	[$6], 
-	,
-	[AC_TRY_COMPILE([#define $1 $2]
-[$5]
-	   ,
-	   [$6],
-	   [$3=$2])])])
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$5]], [[$6]])],[],[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define $1 $2
+$5
+	   ]], [[$6]])],[$3=$2],[])])])
    if test "[$]$3" != no; then
      AC_DEFINE_UNQUOTED([$1], [$]$3, [$4])
 
@@ -713,11 +704,9 @@ AC_DEFUN([AC_SYS_LARGEFILE],
         if test "$GCC" != yes; then
 	  # IRIX 6.2 and later do not support large files by default,
 	  # so use the C compiler's -n32 option if that helps.
-	  AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , ,
-	    [ac_save_CC="${CC-cc}"
+	  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_SYS_LARGEFILE_TEST_INCLUDES], [[]])],[],[ac_save_CC="${CC-cc}"
 	     CC="$CC -n32"
-	     AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, ,
-	       ac_cv_sys_largefile_CC=' -n32')
+	     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_SYS_LARGEFILE_TEST_INCLUDES], [[]])],[ac_cv_sys_largefile_CC=' -n32'],[])
 	     CC="$ac_save_CC"])
         fi])
      if test "$ac_cv_sys_largefile_CC" != no; then
@@ -761,9 +750,7 @@ AC_DEFUN([AC_FUNC_FSEEKO],
 
    AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko,
      [ac_cv_func_fseeko=no
-      AC_TRY_LINK([#include <stdio.h>],
-        [return fseeko && fseeko (stdin, 0, 0);],
-	[ac_cv_func_fseeko=yes])])
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[return fseeko && fseeko (stdin, 0, 0);]])],[ac_cv_func_fseeko=yes],[])])
    if test $ac_cv_func_fseeko != no; then
      AC_DEFINE(HAVE_FSEEKO, 1,
        [Define if fseeko (and presumably ftello) exists and is declared.])
@@ -774,9 +761,8 @@ dnl XXXXXXXXXXXXXXXXXX End Stolen (but modified) from GNU tar XXXXXXXXXXXXXX
 
 AC_DEFUN([AC_HAVE_LARGEFILES],
 [AC_CACHE_CHECK([if system supports Large Files at all], ac_cv_largefiles,
-     	[AC_TRY_COMPILE([#include <stdio.h>
-#include <sys/types.h>],
-     		[
+     	[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+#include <sys/types.h>]], [[
 /*
  * Check that off_t can represent 2**63 - 1 correctly.
  * We can't simply "#define LARGE_OFF_T 9223372036854775807",
@@ -800,11 +786,9 @@ return !ftello64;
 #else
 return !fseeko;
 return !ftello;
-#endif],
-     		[ac_cv_largefiles=yes],
-     		[ac_cv_largefiles=no])])
+#endif]])],[ac_cv_largefiles=yes],[ac_cv_largefiles=no])])
 	if test $ac_cv_largefiles = yes; then
-		AC_DEFINE(HAVE_LARGEFILES)
+		AC_DEFINE(HAVE_LARGEFILES, 1, [define if we have LFS])
 	  USE_LARGEFILES=1
 	else
 	  USE_LARGEFILES=
@@ -819,12 +803,9 @@ dnl and whether there is a prototype for fseeko()
 dnl Defines HAVE_FSEEKO on success.
 AC_DEFUN([AC_SMALL_FSEEKO],
 [AC_CACHE_CHECK([for fseeko()], ac_cv_func_fseeko,
-                [AC_TRY_LINK([#include <stdio.h>],
-[return !fseeko;],
-                [ac_cv_func_fseeko=yes],
-                [ac_cv_func_fseeko=no])])
+                [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[return !fseeko;]])],[ac_cv_func_fseeko=yes],[ac_cv_func_fseeko=no])])
 if test $ac_cv_func_fseeko = yes; then
-  AC_DEFINE(HAVE_FSEEKO)
+  AC_DEFINE(HAVE_FSEEKO, 1, [define if fseeko() exists])
 fi])
 
 dnl Checks for whether ftello() is available in non large file mode
@@ -832,12 +813,9 @@ dnl and whether there is a prototype for ftello()
 dnl Defines HAVE_FTELLO on success.
 AC_DEFUN([AC_SMALL_FTELLO],
 [AC_CACHE_CHECK([for ftello()], ac_cv_func_ftello,
-                [AC_TRY_LINK([#include <stdio.h>],
-[return !ftello;],
-                [ac_cv_func_ftello=yes],
-                [ac_cv_func_ftello=no])])
+                [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[return !ftello;]])],[ac_cv_func_ftello=yes],[ac_cv_func_ftello=no])])
 if test $ac_cv_func_ftello = yes; then
-  AC_DEFINE(HAVE_FTELLO)
+  AC_DEFINE(HAVE_FTELLO, 1, [define if ftello() exists])
 fi])
 
 dnl XXXXXXXXXXX End Stolen from cdrtools-2.01 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Diferenças do arquivo suprimidas por serem muito extensas
+ 634 - 590
config.guess


+ 45 - 25
config.sub

@@ -2,7 +2,9 @@
 # Configuration validation subroutine script.
 #   Copyright 1992-2021 Free Software Foundation, Inc.
 
-timestamp='2021-04-30'
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2021-08-14'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -50,7 +52,14 @@ timestamp='2021-04-30'
 #	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
 # It is wrong to echo any other type of specification.
 
-me=$(echo "$0" | sed -e 's,.*/,,')
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
@@ -112,9 +121,11 @@ esac
 
 # Split fields of configuration type
 # shellcheck disable=SC2162
+saved_IFS=$IFS
 IFS="-" read field1 field2 field3 field4 <<EOF
 $1
 EOF
+IFS=$saved_IFS
 
 # Separate into logical components for further validation
 case $1 in
@@ -163,6 +174,10 @@ case $1 in
 						basic_machine=$field1
 						basic_os=$field2
 						;;
+					zephyr*)
+						basic_machine=$field1-unknown
+						basic_os=$field2
+						;;
 					# Manufacturers
 					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
 					| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
@@ -769,22 +784,22 @@ case $basic_machine in
 		vendor=hp
 		;;
 	i*86v32)
-		cpu=$(echo "$1" | sed -e 's/86.*/86/')
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
 		basic_os=sysv32
 		;;
 	i*86v4*)
-		cpu=$(echo "$1" | sed -e 's/86.*/86/')
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
 		basic_os=sysv4
 		;;
 	i*86v)
-		cpu=$(echo "$1" | sed -e 's/86.*/86/')
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
 		basic_os=sysv
 		;;
 	i*86sol2)
-		cpu=$(echo "$1" | sed -e 's/86.*/86/')
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
 		vendor=pc
 		basic_os=solaris2
 		;;
@@ -917,14 +932,16 @@ case $basic_machine in
 		;;
 	leon-*|leon[3-9]-*)
 		cpu=sparc
-		vendor=$(echo "$basic_machine" | sed 's/-.*//')
+		vendor=`echo "$basic_machine" | sed 's/-.*//'`
 		;;
 
 	*-*)
 		# shellcheck disable=SC2162
+		saved_IFS=$IFS
 		IFS="-" read cpu vendor <<EOF
 $basic_machine
 EOF
+		IFS=$saved_IFS
 		;;
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
@@ -1084,7 +1101,7 @@ case $cpu-$vendor in
 		cpu=mipsisa64sb1el
 		;;
 	sh5e[lb]-*)
-		cpu=$(echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/')
+		cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
 		;;
 	spur-*)
 		cpu=spur
@@ -1102,7 +1119,7 @@ case $cpu-$vendor in
 		cpu=x86_64
 		;;
 	xscale-* | xscalee[bl]-*)
-		cpu=$(echo "$cpu" | sed 's/^xscale/arm/')
+		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
 		;;
 	arm64-*)
 		cpu=aarch64
@@ -1165,7 +1182,7 @@ case $cpu-$vendor in
 			| alphapca5[67] | alpha64pca5[67] \
 			| am33_2.0 \
 			| amdgcn \
-			| arc | arceb | arc64 \
+			| arc | arceb | arc32 | arc64 \
 			| arm | arm[lb]e | arme[lb] | armv* \
 			| avr | avr32 \
 			| asmjs \
@@ -1292,30 +1309,32 @@ then
 case $basic_os in
 	gnu/linux*)
 		kernel=linux
-		os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|')
+		os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
 		;;
 	os2-emx)
 		kernel=os2
-		os=$(echo $basic_os | sed -e 's|os2-emx|emx|')
+		os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
 		;;
 	nto-qnx*)
 		kernel=nto
-		os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|')
+		os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
 		;;
 	*-*)
 		# shellcheck disable=SC2162
+		saved_IFS=$IFS
 		IFS="-" read kernel os <<EOF
 $basic_os
 EOF
+		IFS=$saved_IFS
 		;;
 	# Default OS when just kernel was specified
 	nto*)
 		kernel=nto
-		os=$(echo $basic_os | sed -e 's|nto|qnx|')
+		os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
 		;;
 	linux*)
 		kernel=linux
-		os=$(echo $basic_os | sed -e 's|linux|gnu|')
+		os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
 		;;
 	*)
 		kernel=
@@ -1336,7 +1355,7 @@ case $os in
 		os=cnk
 		;;
 	solaris1 | solaris1.*)
-		os=$(echo $os | sed -e 's|solaris1|sunos4|')
+		os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
 		;;
 	solaris)
 		os=solaris2
@@ -1365,7 +1384,7 @@ case $os in
 		os=sco3.2v4
 		;;
 	sco3.2.[4-9]*)
-		os=$(echo $os | sed -e 's/sco3.2./sco3.2v/')
+		os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
 		;;
 	sco*v* | scout)
 		# Don't match below
@@ -1395,7 +1414,7 @@ case $os in
 		os=lynxos
 		;;
 	mac[0-9]*)
-		os=$(echo "$os" | sed -e 's|mac|macos|')
+		os=`echo "$os" | sed -e 's|mac|macos|'`
 		;;
 	opened*)
 		os=openedition
@@ -1404,10 +1423,10 @@ case $os in
 		os=os400
 		;;
 	sunos5*)
-		os=$(echo "$os" | sed -e 's|sunos5|solaris2|')
+		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
 		;;
 	sunos6*)
-		os=$(echo "$os" | sed -e 's|sunos6|solaris3|')
+		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
 		;;
 	wince*)
 		os=wince
@@ -1441,7 +1460,7 @@ case $os in
 		;;
 	# Preserve the version number of sinix5.
 	sinix5.*)
-		os=$(echo $os | sed -e 's|sinix|sysv|')
+		os=`echo "$os" | sed -e 's|sinix|sysv|'`
 		;;
 	sinix*)
 		os=sysv4
@@ -1688,7 +1707,7 @@ fi
 # Now, validate our (potentially fixed-up) OS.
 case $os in
 	# Sometimes we do "kernel-libc", so those need to count as OSes.
-	musl* | newlib* | uclibc*)
+	musl* | newlib* | relibc* | uclibc*)
 		;;
 	# Likewise for "kernel-abi"
 	eabi* | gnueabi*)
@@ -1729,7 +1748,7 @@ case $os in
 	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
 	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
 	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
-	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*)
 		;;
 	# This one is extra strict with allowed versions
 	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
@@ -1746,11 +1765,12 @@ esac
 # As a final step for OS-related things, validate the OS-kernel combination
 # (given a valid OS), if there is a kernel.
 case $kernel-$os in
-	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
+	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+		   | linux-musl* | linux-relibc* | linux-uclibc* )
 		;;
 	uclinux-uclibc* )
 		;;
-	-dietlibc* | -newlib* | -musl* | -uclibc* )
+	-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
 		# These are just libc implementations, not actual OSes, and thus
 		# require a kernel.
 		echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2

Diferenças do arquivo suprimidas por serem muito extensas
+ 10715 - 8726
configure


+ 63 - 57
configure.in

@@ -4,11 +4,12 @@
 # AUTHOR(S):	Original author unknown - probably CERL
 #   	    	Eric G. Miller - egm2 jps.net
 #   	    	Justin Hickey - Thailand - jhickey hpcc.nectec.or.th
-#		Markus Neteler - Germany/Italy - neteler itc.it
+#   	    	Markus Neteler - Germany/Italy - neteler itc.it
+#   	    	Nicklas Larsson (update to autoconfig 2.69)
 # PURPOSE:  	This configure runs all the tests to determine what components
 #   	    	are installed on the current system. It also defines certain
 #   	    	configuration variables for compilation and installation.
-# COPYRIGHT:    (C) 2000-2009, 2011-2012 by the GRASS Development Team
+# COPYRIGHT:    (C) 2000-2021 by the GRASS Development Team
 #
 #               This program is free software under the GNU General
 #   	    	Public License (>=v2). Read the file COPYING that
@@ -19,7 +20,7 @@
 # Website for   config.guess, config.sub:
 #               wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess
 #               wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
-#               Note: use autoconf-2.13
+#               Note: use autoconf-2.69
 #############################################################################
 
 define([AC_CACHE_LOAD], )
@@ -28,9 +29,9 @@ define([AC_CACHE_VAL], [
 $2
 ])
 
-AC_INIT(configure.in)
-AC_PREREQ(2.13)
-AC_PREFIX_DEFAULT(/usr/local)
+AC_INIT
+AC_CONFIG_SRCDIR([configure.ac])
+AC_PREREQ([2.69])
 AC_CONFIG_HEADER(include/grass/config.h)
 AC_CANONICAL_HOST
 AC_PROG_CC
@@ -114,10 +115,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}"
@@ -492,8 +489,13 @@ AC_CHECK_HEADERS(langinfo.h)
 AC_HEADER_TIME
 AC_TYPE_OFF_T
 AC_TYPE_UID_T
-AC_TYPE_SIGNAL
-AC_CYGWIN
+
+AC_CANONICAL_HOST
+case $host_os in
+  *cygwin* ) CYGWIN=yes;;
+	 * ) CYGWIN=no;;
+esac
+
 AC_CHECK_FUNCS(ftime gethostname gettimeofday lseek nice time uname)
 AC_CHECK_FUNCS(seteuid setpriority setreuid setruid)
 AC_CHECK_FUNCS(drand48)
@@ -507,17 +509,17 @@ AC_SUBST(CROSS_COMPILING)
 fi
 
 AC_MSG_CHECKING(for long long int)
-AC_TRY_COMPILE(,[long long int x;],[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long int x;]])],[
 AC_MSG_RESULT(yes)
-AC_DEFINE(HAVE_LONG_LONG_INT)
+AC_DEFINE(HAVE_LONG_LONG_INT, 1, [define if "long long int" is available])
 ],[
 AC_MSG_RESULT(no)
 ])
 
 AC_MSG_CHECKING(for int64_t)
-AC_TRY_COMPILE([#include <sys/types.h>],[int64_t x;],[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>]], [[int64_t x;]])],[
 AC_MSG_RESULT(yes)
-AC_DEFINE(HAVE_INT64_T)
+AC_DEFINE(HAVE_INT64_T, 1, [define if "int64_t" is available])
 ],[
 AC_MSG_RESULT(no)
 ])
@@ -602,7 +604,7 @@ AC_CHECK_LIB(socket, socket, SOCKLIB=-lsocket, [
 AC_SUBST(SOCKLIB)
 if test "$have_socket" = 1 ; then
   HAVE_SOCKET=1
-  AC_DEFINE(HAVE_SOCKET)
+  AC_DEFINE(HAVE_SOCKET, 1, [define if socket() exists])
 else
   HAVE_SOCKET=
 fi
@@ -745,7 +747,7 @@ if test $PROJ4API = 0 ; then
     LOC_CHECK_LIBS(proj,proj_pj_info,External PROJ,$PROJLIB,PROJLIB,,,)
 else
     AC_MSG_RESULT([using old PROJ version 4 API])
-    AC_DEFINE(USE_PROJ4API)
+    AC_DEFINE(USE_PROJ4API, 1, [define if using old PROJ version 4 API])
 
     LOC_CHECK_INCLUDES(proj_api.h,External PROJ,$PROJINC)
     # PROJ version check for v4.x
@@ -889,7 +891,7 @@ else
     GDAL_CFLAGS=`"$GDAL_CONFIG" --cflags`
     USE_GDAL=1
     if test `"$GDAL_CONFIG" --ogr-enabled` = "yes" ; then
-      AC_DEFINE(HAVE_OGR)
+      AC_DEFINE(HAVE_OGR, 1, [define if OGR is to be used])
       USE_OGR=1
     fi
   fi
@@ -899,7 +901,7 @@ else
   ac_save_cflags="$CFLAGS"
   LIBS="$LIBS $GDAL_LIBS"
   CFLAGS="$CFLAGS $GDAL_CFLAGS"
-  AC_TRY_LINK([#include <gdal.h>],[GDALOpen("foo", GA_ReadOnly);],,[
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gdal.h>]], [[GDALOpen("foo", GA_ReadOnly);]])],[],[
   LIBS="$LIBS $GDAL_DEP_LIBS"
   AC_TRY_LINK([#include <gdal.h>],[GDALOpen("foo", GA_ReadOnly);],GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS",[
   AC_MSG_ERROR([*** Unable to locate GDAL library.])
@@ -908,7 +910,7 @@ else
   LIBS=${ac_save_libs}
   CFLAGS=${ac_save_cflags}
 
-  AC_DEFINE(HAVE_GDAL)
+  AC_DEFINE(HAVE_GDAL, 1, [define if GDAL is to be used])
 fi
 
 AC_SUBST(GDAL_LIBS)
@@ -953,7 +955,7 @@ else
   CFLAGS="$CFLAGS $LIBLAS_CFLAGS"
   CPPFLAGS="$CPPFLAGS $LIBLAS_INC"
   AC_CHECK_HEADERS(liblas/capi/liblas.h)
-  AC_TRY_LINK([#include <liblas/capi/liblas.h>],[LASReader_Create("foo");],,[
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <liblas/capi/liblas.h>]], [[LASReader_Create("foo");]])],[],[
   AC_TRY_LINK([#include <liblas/capi/liblas.h>],[LASReader_Create("foo");],LAS_LIBS="$LAS_LIBS",[
   AC_MSG_ERROR([*** Unable to locate libLAS library.])
   ])
@@ -962,7 +964,7 @@ else
   CFLAGS=${ac_save_cflags}
   CPPFLAGS=${ac_save_cppflags}
 
-  AC_DEFINE(HAVE_LIBLAS)
+  AC_DEFINE(HAVE_LIBLAS, 1, [define if liblas exists])
 fi
 
 AC_SUBST(LIBLAS_LIBS)
@@ -974,10 +976,7 @@ AC_SUBST(USE_LIBLAS)
 
 AC_MSG_CHECKING(whether to use PDAL)
 
-# new and currently used way to switch language to C++
-# AC_LANG_PUSH(C++)
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+AC_LANG_PUSH(C++)
 
 PDAL_LIBS=
 PDAL_CPPFLAGS=
@@ -1011,9 +1010,9 @@ else
   LIBS="$LIBS $PDAL_LIBS"
   CFLAGS="$CFLAGS $PDAL_CFLAGS"
   CPPFLAGS="$CPPFLAGS $PDAL_CPPFLAGS $PDAL_INC"
-  AC_TRY_LINK([#include <pdal/PointTable.hpp>
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pdal/PointTable.hpp>
   #include <pdal/Streamable.hpp>
-  class St:public pdal::Streamable {};],[pdal::PointTable table;],,[
+  class St:public pdal::Streamable {};]], [[pdal::PointTable table;]])],[],[
   AC_TRY_LINK([#include <pdal/PointTable.hpp>
   #include <pdal/Streamable.hpp>
   class St:public pdal::Streamable {};],[pdal::PointTable table;],PDAL_LIBS="$PDAL_LIBS",[
@@ -1024,7 +1023,7 @@ else
   CFLAGS=${ac_save_cflags}
   CPPFLAGS=${ac_save_cppflags}
 
-  AC_DEFINE(HAVE_PDAL)
+  AC_DEFINE(HAVE_PDAL, 1, [define if PDAL exists])
 fi
 
 AC_SUBST(PDAL_LIBS)
@@ -1032,10 +1031,7 @@ AC_SUBST(PDAL_CPPFLAGS)
 AC_SUBST(PDAL_INC)
 AC_SUBST(USE_PDAL)
 
-# new and currently used way to switch language back to C
-# AC_LANG_POP(C++)
-AC_LANG_C
-AC_LANG_RESTORE
+AC_LANG_POP(C++)
 
 # NetCDF option
 
@@ -1070,7 +1066,7 @@ else
   ac_save_cflags="$CFLAGS"
   LIBS="$LIBS $NETCDF_LIBS"
   CFLAGS="$CFLAGS $NETCDF_CFLAGS"
-  AC_TRY_LINK([#include <netcdf.h>],[nc_create("foo", NC_CLOBBER, NULL);],,[
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netcdf.h>]], [[nc_create("foo", NC_CLOBBER, NULL);]])],[],[
   AC_TRY_LINK([#include <netcdf.h>],[nc_create("foo", NC_CLOBBER, NULL);],NETCDF_LIBS="$NETCDF_LIBS",[
   AC_MSG_ERROR([*** Unable to locate NetCDF library.])
   ])
@@ -1078,7 +1074,7 @@ else
   LIBS=${ac_save_libs}
   CFLAGS=${ac_save_cflags}
 
-  AC_DEFINE(HAVE_NETCDF)
+  AC_DEFINE(HAVE_NETCDF, 1, [define if NetCDF exists])
 fi
 
 AC_SUBST(NETCDF_LIBS)
@@ -1121,7 +1117,7 @@ else
 #  else
   LOC_CHECK_LIBS(geos_c,initGEOS,GEOS,$GEOS_LIBS,GEOS_LIBS)
 #  fi
-  AC_DEFINE(HAVE_GEOS)
+  AC_DEFINE(HAVE_GEOS, 1, [define if GEOS is to be used])
 fi
 
 AC_SUBST(GEOS_LIBS)
@@ -1192,7 +1188,7 @@ AC_SUBST(USE_PNG)
 LOC_CHECK_USE(postgres,PostgreSQL,USE_POSTGRES)
 
 if test -n "$USE_POSTGRES"; then
-AC_DEFINE(HAVE_POSTGRES)
+AC_DEFINE(HAVE_POSTGRES, 1, [define if PostgreSQL is to be used])
 fi # $USE_POSTGRES
 
 PQINCPATH=
@@ -1219,8 +1215,8 @@ LOC_CHECK_LIBS(pq,PQsetdbLogin,PostgreSQL,$PQLIBPATH,PQLIB,,,,-lcrypt,-lssl -lcr
 
 ac_save_ldflags="$LDFLAGS"
 LDFLAGS="$LDFLAGS $PQLIBPATH"
-AC_CHECK_LIB(pq,PQcmdTuples, [AC_DEFINE(HAVE_PQCMDTUPLES)], [
-AC_CHECK_LIB(pq,PQcmdTuples, [AC_DEFINE(HAVE_PQCMDTUPLES)], [
+AC_CHECK_LIB(pq,PQcmdTuples, [AC_DEFINE(HAVE_PQCMDTUPLES, 1, [define if PQcmdTuples in lpq])], [
+AC_CHECK_LIB(pq,PQcmdTuples, [AC_DEFINE(HAVE_PQCMDTUPLES, 1, [define if PQcmdTuples in lpq])], [
 ], -lcrypt)
 ])
 LDFLAGS="${ac_save_ldflags}"
@@ -1268,8 +1264,7 @@ if test -n "$USE_MYSQL"; then
   fi
 
   if test "$MYSQLD_CONFIG" != "" ; then
-    AC_LANG_SAVE
-    AC_LANG_CPLUSPLUS
+    AC_LANG_PUSH([C++])
     ac_save_libs="$LIBS"
     MYSQLDLIB=`"$MYSQLD_CONFIG" --libmysqld-libs`
 
@@ -1277,8 +1272,7 @@ if test -n "$USE_MYSQL"; then
     AC_CHECK_FUNC(mysql_server_init,,[MYSQLDLIB="";
                   AC_MSG_WARN([libmysqld not found])] )
     LIBS=$ac_save_libs
-    AC_LANG_C
-    AC_LANG_RESTORE
+    AC_LANG_POP([C++])
   fi
 
 fi # $USE_MYSQL
@@ -1308,7 +1302,7 @@ LOC_CHECK_INC_PATH(sqlite,SQLite,SQLITEINCPATH)
 
 LOC_CHECK_INCLUDES(sqlite3.h,SQLite,$SQLITEINCPATH)
 
-AC_DEFINE(HAVE_SQLITE)
+AC_DEFINE(HAVE_SQLITE, 1, [define if SQLite is to be used])
 
 fi # $USE_SQLITE
 
@@ -1387,10 +1381,10 @@ LOC_CHECK_LIBS(GLU,gluBeginCurve,GLU,$OPENGL_LIB_PATH,OPENGLULIB,$OPENGLLIB $X_L
 OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
 OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
 
-LOC_CHECK_FUNC(glXCreatePbuffer,,,,,$OPENGLLIB,[AC_DEFINE(HAVE_PBUFFERS)])
-LOC_CHECK_FUNC(glXCreateGLXPixmap,,,,,$OPENGLLIB,[AC_DEFINE(HAVE_PIXMAPS)])
+LOC_CHECK_FUNC(glXCreatePbuffer,,,,,$OPENGLLIB,[AC_DEFINE(HAVE_PBUFFERS, 1, [define if glXCreatePbuffer exists])])
+LOC_CHECK_FUNC(glXCreateGLXPixmap,,,,,$OPENGLLIB,[AC_DEFINE(HAVE_PIXMAPS, 1, [define if glXCreateGLXPixmap exists])])
 
-AC_DEFINE(OPENGL_X11)
+AC_DEFINE(OPENGL_X11, 1, [define if OpenGL uses X11])
 
 fi # $OPENGL_X11
 
@@ -1406,7 +1400,7 @@ LOC_CHECK_FUNC(gluBeginCurve,GLU library,OPENGLLIB,,$OPENGLPATH,$OPENGLLIB)
 OPENGLINC="$OPENGLPATH"
 OPENGLLIBPATH="$OPENGLPATH"
 
-AC_DEFINE(OPENGL_AQUA)
+AC_DEFINE(OPENGL_AQUA, 1, [define if OpenGL uses Aqua (MacOS X)])
 
 fi # $OPENGL_AQUA
 
@@ -1431,7 +1425,7 @@ CFLAGS="${ac_save_cflags}"
 OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
 OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
 
-AC_DEFINE(OPENGL_WINDOWS)
+AC_DEFINE(OPENGL_WINDOWS, 1, [define if OpenGL uses Windows])
 
 fi # $OPENGL_WINDOWS
 
@@ -1461,7 +1455,18 @@ if test -n "$USE_ODBC"; then
 
 LOC_CHECK_INC_PATH(odbc,ODBC,ODBCINC)
 
-LOC_CHECK_INCLUDES(sql.h,ODBC,$ODBCINC)
+AC_CHECK_HEADER([windows.h],
+    AC_DEFINE(HAVE_WINDOWS_H, 1, [Define to 1 if you have the <windows.h> header file.]))
+ 
+ac_save_cppflags="$CPPFLAGS"
+CPPFLAGS="$ODBCINC $CPPFLAGS"
+AC_CHECK_HEADER([sql.h],
+AC_DEFINE(HAVE_SQL_H, 1, [Define to 1 if you have the <sql.h> header file.]),
+AC_MSG_ERROR([*** Unable to locate <sql.h>.]),[#if defined(HAVE_WINDOWS_H)
+# include <windows.h>
+#endif
+])
+CPPFLAGS=$ac_save_cppflags
 
 # With ODBC library directory
 
@@ -1560,7 +1565,7 @@ LDFLAGS="$save_LDFLAGS"
 
 # Do we have ATLAS?
 if test $blas_ok = yes; then
-	AC_DEFINE(HAVE_LIBATLAS)
+	AC_DEFINE(HAVE_LIBATLAS, 1, [define if ATLAS exists])
 fi
 
 # BLAS in Apple vecLib framework? (Mac OS-X)
@@ -1571,7 +1576,7 @@ if test $blas_ok = no; then
 	save_LIBS="$LIBS"
 	LIBS="$vlib_flags $LIBS"
 	AC_MSG_CHECKING([for sgemm in $vlib_flags])
-	AC_TRY_LINK([], [sgemm], [blas_ok=yes; BLASLIB="$vlib_flags"], [BLASLIB=""])
+	AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[sgemm]])],[blas_ok=yes; BLASLIB="$vlib_flags"],[BLASLIB=""])
 	AC_MSG_RESULT($blas_ok)
 	LIBS="$save_LIBS"
 fi
@@ -1605,7 +1610,7 @@ if test $blas_ok = no; then
 fi
 
 if test $blas_ok = yes; then
-AC_DEFINE(HAVE_LIBBLAS)
+AC_DEFINE(HAVE_LIBBLAS, 1, [define if BLAS exists])
 fi
 
 fi # $USE_BLAS
@@ -1664,7 +1669,7 @@ if test $lapack_ok = no; then
 	LOC_CHECK_LIBS(lapack,dgesv_,LAPACK,$LAPACKLIB,LAPACKLIB,$BLASLIB $MATHLIB,,,-lg2c)
 fi
 
-AC_DEFINE(HAVE_LIBLAPACK)
+AC_DEFINE(HAVE_LIBLAPACK, 1, [define if LAPACK exists])
 
 fi # $USE_LAPACK
 fi # $USE_BLAS
@@ -1767,7 +1772,7 @@ INTLLIB=
 HAVE_NLS=
 
 if test -n "${USE_NLS}" ; then
-    AC_DEFINE(USE_NLS)
+    AC_DEFINE(USE_NLS, 1, [define if NLS requested])
 
 AC_CHECK_FUNC(gettext, INTLLIB=, [
 AC_CHECK_LIB(intl, gettext, INTLLIB=-lintl, [
@@ -1995,7 +2000,8 @@ AC_SUBST(STRIPFLAG)
 GRASS_HOME="${DSTDIR}"
 AC_SUBST(GRASS_HOME)
 
-AC_OUTPUT(include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/grass/version.h grass.pc)
+AC_CONFIG_FILES([include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/grass/version.h grass.pc])
+AC_OUTPUT
 
 LOC_MSG([Copying config.status to config.status.${ARCH}])
 cp -f config.status config.status.${ARCH}

+ 2 - 4
docker/alpine/Dockerfile

@@ -89,17 +89,16 @@ FROM common as build
 ENV GRASS_CONFIG="\
       --enable-largefile \
       --with-cxx \
-      --with-proj --with-proj-share=/usr/share/proj \
+      --with-proj-share=/usr/share/proj \
       --with-gdal \
       --with-pdal \
-      --with-python \
       --with-geos \
       --with-sqlite \
       --with-bzlib \
       --with-zstd \
       --with-cairo --with-cairo-ldflags=-lfontconfig \
       --with-fftw \
-      --with-postgres --with-postgres-includes='/usr/include/postgresql' \
+      --with-postgres --with-postgres-includes=/usr/include/postgresql \
       --without-freetype \
       --without-openmp \
       --without-opengl \
@@ -107,7 +106,6 @@ ENV GRASS_CONFIG="\
       --without-mysql \
       --without-odbc \
       --without-openmp \
-      --without-ffmpeg \
       "
 
 # Set environmental variables for GRASS GIS compilation, without debug symbols

+ 2 - 3
docker/debian/Dockerfile

@@ -174,14 +174,14 @@ RUN make distclean || echo "nothing to clean"
 RUN /src/grass_build/configure \
   --with-cxx \
   --enable-largefile \
-  --with-proj --with-proj-share=/usr/share/proj \
+  --with-proj-share=/usr/share/proj \
   --with-gdal=/usr/bin/gdal-config \
   --with-geos \
   --with-sqlite \
   --with-cairo --with-cairo-ldflags=-lfontconfig \
   --with-freetype --with-freetype-includes="/usr/include/freetype2/" \
   --with-fftw \
-  --with-postgres=yes --with-postgres-includes="/usr/include/postgresql" \
+  --with-postgres --with-postgres-includes="/usr/include/postgresql" \
   --with-netcdf \
   --with-zstd \
   --with-bzlib \
@@ -189,7 +189,6 @@ RUN /src/grass_build/configure \
   --without-mysql \
   --without-odbc \
   --without-openmp \
-  --without-ffmpeg \
   --without-opengl \
     && make -j $NUMTHREADS \
     && make install && ldconfig

+ 2 - 3
docker/ubuntu/Dockerfile

@@ -166,14 +166,14 @@ RUN make distclean || echo "nothing to clean"
 RUN /src/grass_build/configure \
   --with-cxx \
   --enable-largefile \
-  --with-proj --with-proj-share=/usr/share/proj \
+  --with-proj-share=/usr/share/proj \
   --with-gdal=/usr/bin/gdal-config \
   --with-geos \
   --with-sqlite \
   --with-cairo --with-cairo-ldflags=-lfontconfig \
   --with-freetype --with-freetype-includes="/usr/include/freetype2/" \
   --with-fftw \
-  --with-postgres=yes --with-postgres-includes="/usr/include/postgresql" \
+  --with-postgres --with-postgres-includes="/usr/include/postgresql" \
   --with-netcdf \
   --with-zstd \
   --with-bzlib \
@@ -181,7 +181,6 @@ RUN /src/grass_build/configure \
   --without-mysql \
   --without-odbc \
   --without-openmp \
-  --without-ffmpeg \
   --without-opengl \
     && make -j $NUMTHREADS \
     && make install && ldconfig

+ 1 - 1
include/grass/Makefile

@@ -40,4 +40,4 @@ $(ARCH_INCDIR)/citing.h: $(MODULE_TOPDIR)/CITING | $(ARCH_INCDIR)
 	sed -e 's/^\(.*\)$$/"\1\\n"/' $< > $@
 
 $(ARCH_INCDIR)/confparms.h: $(MODULE_TOPDIR)/config.status | $(ARCH_INCDIR)
-	sed -n '7s/^#\(.*\)$$/"\1"/p' $< > $@
+	$< --config | sed "s/'//g" | sed 's/\(.*\)/".\/configure \1"/' > $@

+ 259 - 156
include/grass/config.h.in

@@ -8,251 +8,354 @@
 
 #define GDEBUG 1
 
-/* define _OE_SOCKETS flag (OS/390 sys/socket.h) */
-#undef _OE_SOCKETS
+/* Define to 1 if you have the <ad2.h> header file. */
+#undef HAVE_AD2_H
 
-/* define _REENTRANT flag (for SunOS) */
-#undef _REENTRANT
+/* Define to 1 if you have the `asprintf' function. */
+#undef HAVE_ASPRINTF
 
-/* define USE_DELTA_FOR_TZ (for AIX) */
-#undef USE_DELTA_FOR_TZ
+/* Define to 1 if you have the <bzlib.h> header file. */
+#undef HAVE_BZLIB_H
 
-/* define for Windows static build */
-#undef STATIC_BUILD
+/* Define to 1 if you have the <cairo.h> header file. */
+#undef HAVE_CAIRO_H
 
-/* define if limits.h exists */
-#undef HAVE_LIMITS_H
+/* Define to 1 if you have the <cblas.h> header file. */
+#undef HAVE_CBLAS_H
 
-/* define if termio.h exists */
-#undef HAVE_TERMIO_H
+/* Define to 1 if you have the <clapack.h> header file. */
+#undef HAVE_CLAPACK_H
 
-/* define if termios.h exists */
-#undef HAVE_TERMIOS_H
+/* Define to 1 if you have the <CL/cl.h> header file. */
+#undef HAVE_CL_CL_H
 
-/* define if unistd.h exists */
-#undef HAVE_UNISTD_H
+/* Define to 1 if you have the <dfftw.h> header file. */
+#undef HAVE_DFFTW_H
 
-/* define if values.h exists */
-#undef HAVE_VALUES_H
+/* Define to 1 if you have the `drand48' function. */
+#undef HAVE_DRAND48
 
-/* define if zlib.h exists */
-#undef HAVE_ZLIB_H
+/* Define to 1 if you have the <f2c.h> header file. */
+#undef HAVE_F2C_H
 
-/* define if bzlib.h exists */
-#undef HAVE_BZLIB_H
+/* Define to 1 if you have the <fftw3.h> header file. */
+#undef HAVE_FFTW3_H
 
-/* define if zstd.h exists */
-#undef HAVE_ZSTD_H
+/* Define to 1 if you have the <fftw.h> header file. */
+#undef HAVE_FFTW_H
 
-/* define if sys/ioctl.h exists */
-#undef HAVE_SYS_IOCTL_H
+/* Define if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
 
-/* define if sys/mtio.h exists */
-#undef HAVE_SYS_MTIO_H
+/* Define to 1 if you have the <ft2build.h> header file. */
+#undef HAVE_FT2BUILD_H
 
-/* define if sys/resource.h exists */
-#undef HAVE_SYS_RESOURCE_H
+/* Define to 1 if you have the `ftime' function. */
+#undef HAVE_FTIME
 
-/* define if sys/time.h exists */
-#undef HAVE_SYS_TIME_H
+/* Define to 1 if you have the <g2c.h> header file. */
+#undef HAVE_G2C_H
 
-/* define if time.h and sys/time.h can be included together */
-#undef TIME_WITH_SYS_TIME
+/* define if GDAL is to be used */
+#undef HAVE_GDAL
 
-/* define if sys/timeb.h exists */
-#undef HAVE_SYS_TIMEB_H
+/* define if GEOS is to be used */
+#undef HAVE_GEOS
 
-/* define if sys/types.h exists */
-#undef HAVE_SYS_TYPES_H
+/* Define to 1 if you have the <geos_c.h> header file. */
+#undef HAVE_GEOS_C_H
 
-/* define if sys/utsname.h exists */
-#undef HAVE_SYS_UTSNAME_H
+/* Define to 1 if you have the `gethostname' function. */
+#undef HAVE_GETHOSTNAME
 
-/* define if g2c.h exists */
-#undef HAVE_G2C_H
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
 
-/* define if f2c.h exists */
-#undef HAVE_F2C_H
+/* Define to 1 if you have the <GL/glu.h> header file. */
+#undef HAVE_GL_GLU_H
 
-/* define if cblas.h exists */
-#undef HAVE_CBLAS_H
+/* Define to 1 if you have the <GL/gl.h> header file. */
+#undef HAVE_GL_GL_H
 
-/* define if clapack.h exists */
-#undef HAVE_CLAPACK_H
+/* Define to 1 if you have the <iconv.h> header file. */
+#undef HAVE_ICONV_H
 
-/* define gid_t type */
-#undef gid_t
+/* define if "int64_t" is available */
+#undef HAVE_INT64_T
 
-/* define off_t type */
-#undef off_t
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
 
-/* define uid_t type */
-#undef uid_t
+/* Define to 1 if you have the <langinfo.h> header file. */
+#undef HAVE_LANGINFO_H
+
+/* define if ATLAS exists */
+#undef HAVE_LIBATLAS
+
+/* define if BLAS exists */
+#undef HAVE_LIBBLAS
+
+/* Define to 1 if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
+
+/* define if LAPACK exists */
+#undef HAVE_LIBLAPACK
+
+/* define if liblas exists */
+#undef HAVE_LIBLAS
+
+/* Define to 1 if you have the <liblas/capi/liblas.h> header file. */
+#undef HAVE_LIBLAS_CAPI_LIBLAS_H
+
+/* Define to 1 if you have the <libpq-fe.h> header file. */
+#undef HAVE_LIBPQ_FE_H
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
 
 /* define if "long long int" is available */
 #undef HAVE_LONG_LONG_INT
 
-/* define if "int64_t" is available */
-#undef HAVE_INT64_T
+/* Define to 1 if you have the `lseek' function. */
+#undef HAVE_LSEEK
 
-/* Define the return type of signal handlers */
-#define RETSIGTYPE int
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
 
-/* define if ftime() exists */
-#undef HAVE_FTIME
+/* Define to 1 if you have the <mysql.h> header file. */
+#undef HAVE_MYSQL_H
 
-/* define if gethostname() exists */
-#undef HAVE_GETHOSTNAME
+/* Define to 1 if you have the `nanosleep' function. */
+#undef HAVE_NANOSLEEP
 
-/* define if gettimeofday() exists */
-#undef HAVE_GETTIMEOFDAY
+/* define if NetCDF exists */
+#undef HAVE_NETCDF
 
-/* define if lseek() exists */
-#undef HAVE_LSEEK
+/* Define to 1 if you have the `nice' function. */
+#undef HAVE_NICE
 
-/* define if time() exists */
-#undef HAVE_TIME
+/* define if OGR is to be used */
+#undef HAVE_OGR
 
-/* define if uname() exists */
-#undef HAVE_UNAME
+/* Define to 1 if you have the <omp.h> header file. */
+#undef HAVE_OMP_H
 
-/* define if seteuid() exists */
+/* Define to 1 if you have the <OpenCL/opencl.h> header file. */
+#undef HAVE_OPENCL_OPENCL_H
+
+/* Define to 1 if you have the <OpenGL/glu.h> header file. */
+#undef HAVE_OPENGL_GLU_H
+
+/* Define to 1 if you have the <OpenGL/gl.h> header file. */
+#undef HAVE_OPENGL_GL_H
+
+/* define if glXCreatePbuffer exists */
+#undef HAVE_PBUFFERS
+
+/* define if PDAL exists */
+#undef HAVE_PDAL
+
+/* define if glXCreateGLXPixmap exists */
+#undef HAVE_PIXMAPS
+
+/* Define to 1 if you have the <png.h> header file. */
+#undef HAVE_PNG_H
+
+/* define if PostgreSQL is to be used */
+#undef HAVE_POSTGRES
+
+/* define if PQcmdTuples in lpq */
+#undef HAVE_PQCMDTUPLES
+
+/* Define to 1 if you have the <proj_api.h> header file. */
+#undef HAVE_PROJ_API_H
+
+/* Define to 1 if you have the <proj.h> header file. */
+#undef HAVE_PROJ_H
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
+
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
+
+/* Define to 1 if you have the <readline/history.h> header file. */
+#undef HAVE_READLINE_HISTORY_H
+
+/* Define to 1 if you have the <readline/readline.h> header file. */
+#undef HAVE_READLINE_READLINE_H
+
+/* Define to 1 if you have the <regex.h> header file. */
+#undef HAVE_REGEX_H
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define to 1 if you have the `seteuid' function. */
 #undef HAVE_SETEUID
 
-/* define if setpriority() exists */
+/* Define to 1 if you have the `setpriority' function. */
 #undef HAVE_SETPRIORITY
 
-/* define if setreuid() exists */
+/* Define to 1 if you have the `setreuid' function. */
 #undef HAVE_SETREUID
 
-/* define if setruid() exists */
+/* Define to 1 if you have the `setruid' function. */
 #undef HAVE_SETRUID
 
-/* define if setpgrp() takes no argument */
-#undef SETPGRP_VOID
+/* define if socket() exists */
+#undef HAVE_SOCKET
 
-/* define if drand48() exists */
-#undef HAVE_DRAND48
+/* define if SQLite is to be used */
+#undef HAVE_SQLITE
 
-/* define if nanosleep() exists */
-#undef HAVE_NANOSLEEP
+/* Define to 1 if you have the <sqlite3.h> header file. */
+#undef HAVE_SQLITE3_H
 
-/* define if asprintf() exists */
-#undef HAVE_ASPRINTF
+/* Define to 1 if you have the <sql.h> header file. */
+#undef HAVE_SQL_H
 
-/* define if postgres is to be used */
-#undef HAVE_POSTGRES
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
 
-/* define if SQLite is to be used */
-#undef HAVE_SQLITE
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
 
-#undef USE_PROJ4API
-#ifndef USE_PROJ4API
-/* define if proj.h exists and if the PROJ4 API should not be used */
-#undef HAVE_PROJ_H
-#endif
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
 
-/* define if GDAL is to be used */
-#undef HAVE_GDAL
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
 
-/* define if OGR is to be used */
-#undef HAVE_OGR
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
 
-/* define if GEOS is to be used */
-#undef HAVE_GEOS
+/* Define to 1 if you have the <sys/mtio.h> header file. */
+#undef HAVE_SYS_MTIO_H
 
-/* define if postgres client header exists */
-#undef HAVE_LIBPQ_FE_H
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
 
-/* define if PQcmdTuples in lpq */
-#undef HAVE_PQCMDTUPLES
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
 
-/* define if ODBC exists */
-#undef HAVE_SQL_H
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#undef HAVE_SYS_TIMEB_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/utsname.h> header file. */
+#undef HAVE_SYS_UTSNAME_H
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
 
-/* define if tiffio.h exists */
+/* Define to 1 if you have the <termio.h> header file. */
+#undef HAVE_TERMIO_H
+
+/* Define to 1 if you have the <tiffio.h> header file. */
 #undef HAVE_TIFFIO_H
 
-/* define if png.h exists */
-#undef HAVE_PNG_H
+/* Define to 1 if you have the `time' function. */
+#undef HAVE_TIME
 
-/* define if jpeglib.h exists */
-#undef HAVE_JPEGLIB_H
+/* Define to 1 if you have the `uname' function. */
+#undef HAVE_UNAME
 
-/* define if fftw3.h exists */
-#undef HAVE_FFTW3_H
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
 
-/* define if fftw.h exists */
-#undef HAVE_FFTW_H
+/* Define to 1 if you have the <values.h> header file. */
+#undef HAVE_VALUES_H
 
-/* define if dfftw.h exists */
-#undef HAVE_DFFTW_H
+/* Define to 1 if you have the <windows.h> header file. */
+#undef HAVE_WINDOWS_H
 
-/* define if BLAS exists */
-#undef HAVE_LIBBLAS
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
 
-/* define if LAPACK exists */
-#undef HAVE_LIBLAPACK
+/* Define to 1 if you have the <zstd.h> header file. */
+#undef HAVE_ZSTD_H
 
-/* define if ATLAS exists */
-#undef HAVE_LIBATLAS
+/* define if OpenGL uses Aqua (MacOS X) */
+#undef OPENGL_AQUA
 
-/* define if dbm.h exists */
-#undef HAVE_DBM_H
+/* define if OpenGL uses Windows */
+#undef OPENGL_WINDOWS
 
-/* define if readline exists */
-#undef HAVE_READLINE_READLINE_H
+/* define if OpenGL uses X11 */
+#undef OPENGL_X11
 
-/* define if ft2build.h exists */
-#undef HAVE_FT2BUILD_H
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
 
-/* Whether or not we are using G_socks for display communications */
-#undef USE_G_SOCKS
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
 
-/* define if X is disabled or unavailable */
-#undef X_DISPLAY_MISSING
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
 
-/* define if libintl.h exists */
-#undef HAVE_LIBINTL_H
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
 
-/* define if iconv.h exists */
-#undef HAVE_ICONV_H
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if the `setpgrp' function takes no argument. */
+#undef SETPGRP_VOID
+
+/* define for Windows static build */
+#undef STATIC_BUILD
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
 
 /* define if NLS requested */
 #undef USE_NLS
 
-/* define if putenv() exists */
-#undef HAVE_PUTENV
+/* define if using old PROJ version 4 API */
+#undef USE_PROJ4API
 
-/* define if setenv() exists */
-#undef HAVE_SETENV
+/* Define to 1 if the X Window System is missing or not being used. */
+#undef X_DISPLAY_MISSING
 
-/* define if socket() exists */
-#undef HAVE_SOCKET
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+   `char[]'. */
+#undef YYTEXT_POINTER
 
-/* define if glXCreatePbuffer exists */
-#undef HAVE_PBUFFERS
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
 
-/* define if glXCreateGLXPixmap exists */
-#undef HAVE_PIXMAPS
+/* Define to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
 
-/* define if OpenGL uses X11 */
-#undef OPENGL_X11
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
 
-/* define if OpenGL uses Aqua (MacOS X) */
-#undef OPENGL_AQUA
+/* enable threading extensions on Solaris */
+#undef _POSIX_PTHREAD_SEMANTICS
 
-/* define if OpenGL uses Windows */
-#undef OPENGL_WINDOWS
+/* define _REENTRANT flag (for SunOS) */
+#undef _REENTRANT
 
-/* define if regex.h exists */
-#undef HAVE_REGEX_H
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
 
-/* define if pthread.h exists */
-#undef HAVE_PTHREAD_H
+/* Define to `long int' if <sys/types.h> does not define. */
+#undef off_t
 
-/* define if fseeko() exists */
-#undef HAVE_FSEEKO
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
 
 /*
  * configuration information solely dependent on the above

+ 1 - 1
lib/calc/calc.c

@@ -13,7 +13,7 @@ int columns;
 
 /****************************************************************************/
 
-static RETSIGTYPE handle_fpe(int n)
+static void handle_fpe(int n)
 {
     floating_point_exception = 1;
     floating_point_exception_occurred = 1;

+ 1 - 1
lib/gis/compress.h

@@ -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/grass/config.h.in
  * modify compress.h (this file)
  * nothing to change in compress.c
  */

+ 2 - 2
lib/gis/env.c

@@ -269,9 +269,9 @@ static void write_env(int loc)
     FILE *fd;
     int n;
     char dummy[2];
-    RETSIGTYPE (*sigint)(int);
+    void (*sigint)(int);
 #ifdef SIGQUIT
-    RETSIGTYPE (*sigquit)(int);
+    void (*sigquit)(int);
 #endif
 
     if (loc == G_VAR_GISRC && st->varmode == G_GISRC_MODE_MEMORY)

+ 1 - 1
lib/gis/pager.c

@@ -7,7 +7,7 @@
 #include <grass/gis.h>
 
 #ifdef SIGPIPE
-static RETSIGTYPE (*sigpipe)(int);
+static void (*sigpipe)(int);
 #endif
 
 FILE *G_open_pager(struct Popen *pager)

+ 1 - 1
lib/manage/sighold.c

@@ -23,7 +23,7 @@
 */
 int M__hold_signals(int hold)
 {
-    RETSIGTYPE (*sig)() = hold ? SIG_IGN : SIG_DFL;
+    void (*sig)() = hold ? SIG_IGN : SIG_DFL;
 
     signal(SIGINT, sig);
 

+ 0 - 3
mswindows/osgeo4w/config.h.vc

@@ -93,9 +93,6 @@
 /* define if "long long" is available */
 #define HAVE_LONG_LONG_INT 1
 
-/* Define the return type of signal handlers */
-#define RETSIGTYPE void
-
 /* define curses.h WINDOW structure component */
 #define CURSES_MAXY _maxy