Andrew Dunstan wrote:
> Peter Eisentraut wrote:
> 
> >Andrew Dunstan wrote:
> >  
> >
> >>The patch as applied is totally broken - the tests have to be run by
> >>config.status after it has actually tried to make the links, which is
> >>why I used AC_CONFIG_COMMANDS.
> >>    
> >>
> >
> >Additional note: Instead of listing the files explicitly, just use 
> >$CONFIG_LINKS, which contains the list of files.
> >
> >
> >  
> >
> 
> Well, yes, except that each entry there is in the form 
> linkname:targetname - we'd have to have extra code to split them up. 
> Something like:
> 
> for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
>   linktry=`echo "$ac_file" | sed 's,:.*,,'`
>   test ......
> done

OK, attached patch applied.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: configure
===================================================================
RCS file: /cvsroot/pgsql-server/configure,v
retrieving revision 1.359
diff -c -c -r1.359 configure
*** configure   13 May 2004 01:44:59 -0000      1.359
--- configure   13 May 2004 22:56:38 -0000
***************
*** 17974,17998 ****
  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}"
  
  
- # Links sometimes fail undetected on Mingw -
- # so here we detect it and warn the user
- case $host_os in mingw*)
-  for linktarget in \
-       src/backend/port/tas.s \
-       src/backend/port/dynloader.c \
-       src/backend/port/pg_sema.c \
-       src/backend/port/pg_shmem.c \
-       src/include/dynloader.h \
-       src/include/pg_config_os.h \
-       src/Makefile.port
-  do
-       # test -e works for symlinks in the MinGW console
-       test -e $linktarget || { echo "$as_me:$LINENO: WARNING: *** link for 
$linktarget failed - please fix by hand" >&5
- echo "$as_me: WARNING: *** link for $linktarget failed - please fix by hand" >&2;}
-  done
-       ;;
- esac
- 
  ac_config_headers="$ac_config_headers src/include/pg_config.h"
  
  
--- 17974,17979 ----
***************
*** 19200,19203 ****
--- 19181,19197 ----
    # would make configure fail if this is the last instruction.
    $ac_cs_success || { (exit 1); exit 1; }
  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
  
Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql-server/configure.in,v
retrieving revision 1.347
diff -c -c -r1.347 configure.in
*** configure.in        13 May 2004 01:45:02 -0000      1.347
--- configure.in        13 May 2004 22:56:39 -0000
***************
*** 1236,1263 ****
    src/Makefile.port:src/makefiles/Makefile.${template}
  ])
  
  # Links sometimes fail undetected on Mingw - 
  # so here we detect it and warn the user
  case $host_os in mingw*)
!  for linktarget in \
!       src/backend/port/tas.s \
!       src/backend/port/dynloader.c \
!       src/backend/port/pg_sema.c \
!       src/backend/port/pg_shmem.c \
!       src/include/dynloader.h \
!       src/include/pg_config_os.h \
!       src/Makefile.port
   do
        # test -e works for symlinks in the MinGW console
!       test -e $linktarget || AC_MSG_WARN([*** link for $linktarget failed - please 
fix by hand])
   done
        ;;
  esac
  
- AC_CONFIG_HEADERS([src/include/pg_config.h],
- [
- # Update timestamp for pg_config.h (see Makefile.global)
- echo >src/include/stamp-h
- ])
- 
- AC_OUTPUT
--- 1236,1257 ----
    src/Makefile.port:src/makefiles/Makefile.${template}
  ])
  
+ AC_CONFIG_HEADERS([src/include/pg_config.h],
+ [
+ # Update timestamp for pg_config.h (see Makefile.global)
+ echo >src/include/stamp-h
+ ])
+ 
+ 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
  
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to