mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 00:03:57 -04:00 
			
		
		
		
	Improve configure win32 link test to run from config.status.
Andrew Dunstan
This commit is contained in:
		
							parent
							
								
									d14db1321b
								
							
						
					
					
						commit
						4307ca2a40
					
				
							
								
								
									
										100
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										100
									
								
								configure
									
									
									
									
										vendored
									
									
								
							| @ -17974,6 +17974,12 @@ ac_config_files="$ac_config_files GNUmakefile src/Makefile.global" | |||||||
| ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}" | ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | case $host_os in mingw*) | ||||||
|  | ac_config_commands="$ac_config_commands default-1" | ||||||
|  | 
 | ||||||
|  | 	;; | ||||||
|  | esac | ||||||
|  | 
 | ||||||
| ac_config_headers="$ac_config_headers src/include/pg_config.h" | ac_config_headers="$ac_config_headers src/include/pg_config.h" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -18359,6 +18365,9 @@ $config_headers | |||||||
| Configuration links: | Configuration links: | ||||||
| $config_links | $config_links | ||||||
| 
 | 
 | ||||||
|  | Configuration commands: | ||||||
|  | $config_commands | ||||||
|  | 
 | ||||||
| Report bugs to <bug-autoconf@gnu.org>." | Report bugs to <bug-autoconf@gnu.org>." | ||||||
| _ACEOF | _ACEOF | ||||||
| 
 | 
 | ||||||
| @ -18441,9 +18450,16 @@ done | |||||||
| 
 | 
 | ||||||
| _ACEOF | _ACEOF | ||||||
| 
 | 
 | ||||||
|  | cat >>$CONFIG_STATUS <<_ACEOF | ||||||
|  | # | ||||||
|  | # INIT-COMMANDS section. | ||||||
|  | # | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | _ACEOF | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| cat >>$CONFIG_STATUS <<\_ACEOF | cat >>$CONFIG_STATUS <<\_ACEOF | ||||||
| for ac_config_target in $ac_config_targets | for ac_config_target in $ac_config_targets | ||||||
| @ -18459,6 +18475,7 @@ do | |||||||
|   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;; |   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;; | ||||||
|   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;; |   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;; | ||||||
|   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;; |   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;; | ||||||
|  |   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; | ||||||
|   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;; |   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;; | ||||||
|   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 |   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | ||||||
| echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | ||||||
| @ -18474,6 +18491,7 @@ if $ac_need_defaults; then | |||||||
|   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files |   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | ||||||
|   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers |   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | ||||||
|   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links |   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | ||||||
|  |   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| # Create a temporary directory, and hook for its removal unless debugging. | # Create a temporary directory, and hook for its removal unless debugging. | ||||||
| @ -19155,6 +19173,76 @@ echo "$as_me: error: cannot link $ac_dest to $srcdir/$ac_source" >&2;} | |||||||
|    { (exit 1); exit 1; }; } |    { (exit 1); exit 1; }; } | ||||||
| done | done | ||||||
| _ACEOF | _ACEOF | ||||||
|  | cat >>$CONFIG_STATUS <<\_ACEOF | ||||||
|  | 
 | ||||||
|  | # | ||||||
|  | # CONFIG_COMMANDS section. | ||||||
|  | # | ||||||
|  | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | ||||||
|  |   ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | ||||||
|  |   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | ||||||
|  |   ac_dir=`(dirname "$ac_dest") 2>/dev/null || | ||||||
|  | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||||||
|  |          X"$ac_dest" : 'X\(//\)[^/]' \| \ | ||||||
|  |          X"$ac_dest" : 'X\(//\)$' \| \ | ||||||
|  |          X"$ac_dest" : 'X\(/\)' \| \ | ||||||
|  |          .     : '\(.\)' 2>/dev/null || | ||||||
|  | echo X"$ac_dest" | | ||||||
|  |     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | ||||||
|  |   	  /^X\(\/\/\)[^/].*/{ s//\1/; q; } | ||||||
|  |   	  /^X\(\/\/\)$/{ s//\1/; q; } | ||||||
|  |   	  /^X\(\/\).*/{ s//\1/; q; } | ||||||
|  |   	  s/.*/./; q'` | ||||||
|  |   ac_builddir=. | ||||||
|  | 
 | ||||||
|  | if test "$ac_dir" != .; then | ||||||
|  |   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | ||||||
|  |   # A "../" for each directory in $ac_dir_suffix. | ||||||
|  |   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | ||||||
|  | else | ||||||
|  |   ac_dir_suffix= ac_top_builddir= | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | case $srcdir in | ||||||
|  |   .)  # No --srcdir option.  We are building in place. | ||||||
|  |     ac_srcdir=. | ||||||
|  |     if test -z "$ac_top_builddir"; then | ||||||
|  |        ac_top_srcdir=. | ||||||
|  |     else | ||||||
|  |        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | ||||||
|  |     fi ;; | ||||||
|  |   [\\/]* | ?:[\\/]* )  # Absolute path. | ||||||
|  |     ac_srcdir=$srcdir$ac_dir_suffix; | ||||||
|  |     ac_top_srcdir=$srcdir ;; | ||||||
|  |   *) # Relative path. | ||||||
|  |     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | ||||||
|  |     ac_top_srcdir=$ac_top_builddir$srcdir ;; | ||||||
|  | esac | ||||||
|  | # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be | ||||||
|  | # absolute. | ||||||
|  | ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` | ||||||
|  | ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` | ||||||
|  | ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` | ||||||
|  | ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | ||||||
|  | echo "$as_me: executing $ac_dest commands" >&6;} | ||||||
|  |   case $ac_dest in | ||||||
|  |     default-1 ) | ||||||
|  | # Links sometimes fail undetected on Mingw - | ||||||
|  | # so here we detect it and warn the user | ||||||
|  | for FILE in "$CONFIG_LINKS" | ||||||
|  |  do | ||||||
|  | 	# test -e works for symlinks in the MinGW console | ||||||
|  | 	# We can't call AC_MSG_WARN from here, so we expand it | ||||||
|  | 	test -e `expr "$FILE" : '\(^:*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5 | ||||||
|  | echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;} | ||||||
|  |  done | ||||||
|  |  ;; | ||||||
|  |   esac | ||||||
|  | done | ||||||
|  | _ACEOF | ||||||
| 
 | 
 | ||||||
| cat >>$CONFIG_STATUS <<\_ACEOF | cat >>$CONFIG_STATUS <<\_ACEOF | ||||||
| 
 | 
 | ||||||
| @ -19183,15 +19271,3 @@ if test "$no_create" != yes; then | |||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # Links sometimes fail undetected on Mingw - |  | ||||||
| # so here we detect it and warn the user |  | ||||||
| case $host_os in mingw*) |  | ||||||
| for FILE in "$CONFIG_LINKS" |  | ||||||
|  do |  | ||||||
| 	# test -e works for symlinks in the MinGW console |  | ||||||
| 	test -e `expr "$FILE" : '\(^:*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5 |  | ||||||
| echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;} |  | ||||||
|  done |  | ||||||
| 	;; |  | ||||||
| esac |  | ||||||
| 
 |  | ||||||
|  | |||||||
							
								
								
									
										28
									
								
								configure.in
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								configure.in
									
									
									
									
									
								
							| @ -1,5 +1,5 @@ | |||||||
| dnl Process this file with autoconf to produce a configure script. | dnl Process this file with autoconf to produce a configure script. | ||||||
| dnl $PostgreSQL: pgsql/configure.in,v 1.348 2004/05/13 22:59:14 momjian Exp $ | dnl $PostgreSQL: pgsql/configure.in,v 1.349 2004/05/17 19:14:47 momjian Exp $ | ||||||
| dnl | dnl | ||||||
| dnl Developers, please strive to achieve this order: | dnl Developers, please strive to achieve this order: | ||||||
| dnl | dnl | ||||||
| @ -1236,6 +1236,21 @@ AC_CONFIG_LINKS([ | |||||||
|   src/Makefile.port:src/makefiles/Makefile.${template} |   src/Makefile.port:src/makefiles/Makefile.${template} | ||||||
| ]) | ]) | ||||||
| 
 | 
 | ||||||
|  | case $host_os in mingw*) | ||||||
|  | AC_OUTPUT_COMMANDS([ | ||||||
|  | # Links sometimes fail undetected on Mingw -  | ||||||
|  | # so here we detect it and warn the user | ||||||
|  | for FILE in "$CONFIG_LINKS" | ||||||
|  |  do | ||||||
|  | 	# test -e works for symlinks in the MinGW console | ||||||
|  | 	# We can't call AC_MSG_WARN from here, so we expand it | ||||||
|  | 	test -e `expr "$FILE" : '\(^:*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5 | ||||||
|  | echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;} | ||||||
|  |  done | ||||||
|  | ]) | ||||||
|  | 	;; | ||||||
|  | esac | ||||||
|  | 
 | ||||||
| AC_CONFIG_HEADERS([src/include/pg_config.h], | AC_CONFIG_HEADERS([src/include/pg_config.h], | ||||||
| [ | [ | ||||||
| # Update timestamp for pg_config.h (see Makefile.global) | # Update timestamp for pg_config.h (see Makefile.global) | ||||||
| @ -1244,14 +1259,3 @@ echo >src/include/stamp-h | |||||||
| 
 | 
 | ||||||
| AC_OUTPUT | AC_OUTPUT | ||||||
| 
 | 
 | ||||||
| # Links sometimes fail undetected on Mingw -  |  | ||||||
| # so here we detect it and warn the user |  | ||||||
| case $host_os in mingw*) |  | ||||||
| for FILE in "$CONFIG_LINKS" |  | ||||||
|  do |  | ||||||
| 	# test -e works for symlinks in the MinGW console |  | ||||||
| 	test -e `expr "$FILE" : '\([^:]*\)'` || AC_MSG_WARN([*** link for $FILE - please fix by hand]) |  | ||||||
|  done |  | ||||||
| 	;; |  | ||||||
| esac |  | ||||||
| 
 |  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user