Re: mingw configure failure detection - Mailing list pgsql-patches

From Andrew Dunstan
Subject Re: mingw configure failure detection
Date
Msg-id 40A3A000.3060109@dunslane.net
Whole thread Raw
In response to Re: mingw configure failure detection  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: mingw configure failure detection
List pgsql-patches
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.

cheers

andrew


Bruce Momjian wrote:

>Adjusted attached patch applied.  Thanks.
>
>I didn't change 'test -e' because 'test -h' doesn't work (is symlink
>test on my platform).  test -f actually works on symlinks too in MinGW,
>strangely enough.  Anyway, the code is only run on MinGW so we don't
>have to worry about other platforms.  I added a comment explaining it
>works.
>
>I got rid of the AC_CONFIG_COMMANDS and just do the for/test loop in the
>shell code directly.  AC_CONFIG_COMMANDS wouldn't allow me to call
>AC_MSG_WARN.
>
>---------------------------------------------------------------------------
>
>
>Peter Eisentraut wrote:
>
>
>>Andrew Dunstan wrote:
>>
>>
>>>This patch for configure.in detects the link failures in MINGW that I
>>>and others have seen and warns the user they have to fix it up.
>>>
>>>
>>I continue to object to these sort of patches if no one wants to bother
>>to contact the mingw maintainers about this problem.  Maybe they have a
>>better fix available?
>>
>>Btw. test -e is not portable.  And please use AC_MSG_WARN instead of
>>"echo".
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>>
>>
>>
>
>
>
>------------------------------------------------------------------------
>
>Index: configure
>===================================================================
>RCS file: /cvsroot/pgsql-server/configure,v
>retrieving revision 1.358
>diff -c -c -r1.358 configure
>*** configure    11 May 2004 21:57:13 -0000    1.358
>--- configure    13 May 2004 01:26:20 -0000
>***************
>*** 17974,17979 ****
>--- 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}.hsrc/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"
>
>
>Index: configure.in
>===================================================================
>RCS file: /cvsroot/pgsql-server/configure.in,v
>retrieving revision 1.346
>diff -c -c -r1.346 configure.in
>*** configure.in    11 May 2004 21:57:13 -0000    1.346
>--- configure.in    13 May 2004 01:26:22 -0000
>***************
>*** 1236,1241 ****
>--- 1236,1259 ----
>    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)
>
>
>------------------------------------------------------------------------
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>               http://archives.postgresql.org
>
>


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: SetDataBaseName
Next
From: Peter Eisentraut
Date:
Subject: Re: mingw configure failure detection