Re: [HACKERS] mingw configure failure workaround - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [HACKERS] mingw configure failure workaround
Date
Msg-id 200405171913.i4HJDFV20749@candle.pha.pa.us
Whole thread Raw
List pgsql-patches
Andrew Dunstan wrote:
> A lot of reading and some experimentation showed that putting this in
> configure.in:
>
> AC_OUTPUT_COMMANDS([
>   for linktarget in 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 $linktarget || echo " ***" link for $linktarget failed -
> please fix by hand
>   done
> ])
>
>
> yielded results looking like this:
>
> config.status: executing default-1 commands
>  *** link for src/backend/port/pg_shmem.c failed - please fix by hand
>  *** link for src/include/dynloader.h failed - please fix by hand

Change made and applied:

    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

The macro only runs on MinGW, of course.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: new aggregate functions v1
Next
From: "Magnus Hagander"
Date:
Subject: Timezone code, one more try