Thread: acinclude.m4.patch

acinclude.m4.patch

From
"Adam H. Pendleton"
Date:
This patch cleans up the acinclude code (wx library is no longer tied to
a particular system type), and fixes the wx-config static libs problem.
I will submit another patch (against this version), when I figure out
what I have to do for embeded XRC files.

ahp
--- pgadmin3/acinclude.m4    2003-06-27 11:40:05.000000000 -0400
+++ pgadmin3.new/acinclude.m4    2003-07-21 13:16:33.000000000 -0400
@@ -187,7 +187,7 @@
     WX_OLD_CPPFLAGS="$CPPFLAGS"
     if test "$pg_static_build" == "yes"
     then
-        WX_NEW_LDFLAGS=`${WX_CONFIG} --libs --static`
+        WX_NEW_LDFLAGS=`${WX_CONFIG} --static --libs`
     else
         WX_NEW_LDFLAGS=`${WX_CONFIG} --libs`
     fi
@@ -208,105 +208,85 @@
     # Here we go!!
     if test "$pg_static_build" == "yes"
     then
-        case "${host}" in
-            *-apple-darwin*)
-                case "${WX_NEW_LDFLAGS}" in
-                    *libwx_macud-*)
-                        LIBS="$LIBS ${WX_HOME}/lib/libwx_macud_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_macud_xrc-${WX_VERSION}.a"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *libwx_macd-*)
-                        LIBS="$LIBS ${WX_HOME}/lib/libwx_macd_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_macd_xrc-${WX_VERSION}.a"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *libwx_mac-*)
-                        LIBS="$LIBS ${WX_HOME}/lib/libwx_mac_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_mac_xrc-${WX_VERSION}.a"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *)
-                        ;;
-                esac
-                ;;
-            *) # This used to be just for Linux, but let's make it the default now as it should be appropriate for any
wxGTKbuild 
-                case "${WX_NEW_LDFLAGS}" in
-                    *libwx_gtk2ud-*)
-                        LIBS="$LIBS ${WX_HOME}/lib/libwx_gtk2ud_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_gtk2ud_xrc-${WX_VERSION}.a"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *libwx_gtk2d-*)
-                        LIBS="$LIBS ${WX_HOME}/lib/libwx_gtk2d_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_gtk2d_xrc-${WX_VERSION}.a"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *libwx_gtk2u-*)
-                        LIBS="$LIBS ${WX_HOME}/lib/libwx_gtk2u_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_gtk2u_xrc-${WX_VERSION}.a"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *libwx_gtkud-*)
-                        LIBS="$LIBS ${WX_HOME}/lib/libwx_gtkud_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_gtkud_xrc-${WX_VERSION}.a"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *libwx_gtkd-*)
-                        LIBS="$LIBS ${WX_HOME}/lib/libwx_gtkd_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_gtkd_xrc-${WX_VERSION}.a"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *libwx_gtk-*)
-                        LIBS="$LIBS ${WX_HOME}/lib/libwx_gtk_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_gtk_xrc-${WX_VERSION}.a"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *)
-                        ;;
-                esac
+        case "${WX_NEW_LDFLAGS}" in
+            *libwx_macud-*)
+                LIBS="$LIBS ${WX_HOME}/lib/libwx_macud_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_macud_xrc-${WX_VERSION}.a"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *libwx_macd-*)
+                LIBS="$LIBS ${WX_HOME}/lib/libwx_macd_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_macd_xrc-${WX_VERSION}.a"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *libwx_mac-*)
+                LIBS="$LIBS ${WX_HOME}/lib/libwx_mac_stc-${WX_VERSION}.a ${WX_HOME}/lib/libwx_mac_xrc-${WX_VERSION}.a"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *libwx_gtk2ud-*)
+                LIBS="$LIBS ${WX_HOME}/lib/libwx_gtk2ud_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_gtk2ud_xrc-${WX_VERSION}.a"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *libwx_gtk2d-*)
+                LIBS="$LIBS ${WX_HOME}/lib/libwx_gtk2d_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_gtk2d_xrc-${WX_VERSION}.a"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *libwx_gtk2u-*)
+                LIBS="$LIBS ${WX_HOME}/lib/libwx_gtk2u_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_gtk2u_xrc-${WX_VERSION}.a"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *libwx_gtkud-*)
+                LIBS="$LIBS ${WX_HOME}/lib/libwx_gtkud_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_gtkud_xrc-${WX_VERSION}.a"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *libwx_gtkd-*)
+                LIBS="$LIBS ${WX_HOME}/lib/libwx_gtkd_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_gtkd_xrc-${WX_VERSION}.a"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *libwx_gtk-*)
+                LIBS="$LIBS ${WX_HOME}/lib/libwx_gtk_stc-${WX_VERSION}.a ${WX_HOME}/lib/libwx_gtk_xrc-${WX_VERSION}.a"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *)
                 ;;
         esac
     else
-        case "${host}" in
-            *-apple-darwin*)
-                case "${WX_NEW_LDFLAGS}" in
-                    *wx_macud-*)
-                        LIBS="$LIBS -lwx_macud_stc-${WX_VERSION} -lwx_macud_xrc-${WX_VERSION}"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *wx_macd-*)
-                        LIBS="$LIBS -lwx_macd_stc-${WX_VERSION} -lwx_macd_xrc-${WX_VERSION}"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *wx_mac-*)
-                        LIBS="$LIBS -lwx_mac_stc-${WX_VERSION} -lwx_mac_xrc-${WX_VERSION}"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *)
-                        ;;
-                esac
-                ;;
-            *)  # This used to be just for Linux, but let's make it the default now as it should be appropriate for
anywxGTK build 
-                case "${WX_NEW_LDFLAGS}" in
-                    *wx_gtk2ud-*)
-                        LIBS="$LIBS -lwx_gtk2ud_stc-${WX_VERSION} -lwx_gtk2ud_xrc-${WX_VERSION}"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *wx_gtk2d-*)
-                        LIBS="$LIBS -lwx_gtk2d_stc-${WX_VERSION} -lwx_gtk2d_xrc-${WX_VERSION}"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *wx_gtk2u-*)
-                        LIBS="$LIBS -lwx_gtk2u_stc-${WX_VERSION} -lwx_gtk2u_xrc-${WX_VERSION}"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *wx_gtkud-*)
-                        LIBS="$LIBS -lwx_gtkud_stc-${WX_VERSION} -lwx_gtkud_xrc-${WX_VERSION}"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *wx_gtkd-*)
-                        LIBS="$LIBS -lwx_gtkd_stc-${WX_VERSION} -lwx_gtkd_xrc-${WX_VERSION}"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *wx_gtk-*)
-                        LIBS="$LIBS -lwx_gtk_stc-${WX_VERSION} -lwx_gtk_xrc-${WX_VERSION}"
-                        LIBS="$LIBS $WX_NEW_LDFLAGS"
-                        ;;
-                    *)
-                        ;;
-                esac
+        case "${WX_NEW_LDFLAGS}" in
+            *wx_macud-*)
+                LIBS="$LIBS -lwx_macud_stc-${WX_VERSION} -lwx_macud_xrc-${WX_VERSION}"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *wx_macd-*)
+                LIBS="$LIBS -lwx_macd_stc-${WX_VERSION} -lwx_macd_xrc-${WX_VERSION}"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *wx_mac-*)
+                LIBS="$LIBS -lwx_mac_stc-${WX_VERSION} -lwx_mac_xrc-${WX_VERSION}"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *wx_gtk2ud-*)
+                LIBS="$LIBS -lwx_gtk2ud_stc-${WX_VERSION} -lwx_gtk2ud_xrc-${WX_VERSION}"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *wx_gtk2d-*)
+                LIBS="$LIBS -lwx_gtk2d_stc-${WX_VERSION} -lwx_gtk2d_xrc-${WX_VERSION}"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *wx_gtk2u-*)
+                LIBS="$LIBS -lwx_gtk2u_stc-${WX_VERSION} -lwx_gtk2u_xrc-${WX_VERSION}"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *wx_gtkud-*)
+                LIBS="$LIBS -lwx_gtkud_stc-${WX_VERSION} -lwx_gtkud_xrc-${WX_VERSION}"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *wx_gtkd-*)
+                LIBS="$LIBS -lwx_gtkd_stc-${WX_VERSION} -lwx_gtkd_xrc-${WX_VERSION}"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *wx_gtk-*)
+                LIBS="$LIBS -lwx_gtk_stc-${WX_VERSION} -lwx_gtk_xrc-${WX_VERSION}"
+                LIBS="$LIBS $WX_NEW_LDFLAGS"
+                ;;
+            *)
                 ;;
         esac
     fi

Re: acinclude.m4.patch

From
"Darko Prenosil"
Date:
----- Original Message -----
From: "Adam H. Pendleton" <fmonkey@fmonkey.net>
To: "pgadmin-hackers" <pgadmin-hackers@postgresql.org>
Sent: Monday, July 21, 2003 7:34 PM
Subject: [pgadmin-hackers] acinclude.m4.patch


> This patch cleans up the acinclude code (wx library is no longer tied to
> a particular system type), and fixes the wx-config static libs problem.
> I will submit another patch (against this version), when I figure out
> what I have to do for embeded XRC files.
>
> ahp
>
I see that msw is excluded. It was something like:

    *libwx_mswud-*)
        LIBS="$LIBS ${WX_HOME}/lib/libwx_mswud_stc-${WX_VERSION}.a
${WX_HOME}/lib/libwx_mswud_xrc-${WX_VERSION}.a"
        LIBS="$LIBS $WX_NEW_LDFLAGS"
        LDFLAGS="$LDFLAGS -mwindows -Wl,--subsystem,windows"
    ...
for    every of :
        *libwx_mswu-*)
        *libwx_mswud-*)
        *libwx_mswd-*)
        *libwx_msw-*)


Is that just forgotten, or something else ? My last mail did not make
through (I'm not shore why).

I explained needed changes for Makefile so the MinGW build can work.

Now I'm not shore any more is MinGW build will be supported ?

However the following lines are supposed to end up in the Makefile:

WINDRES = windres.exe

...

pgadmin3_OBJECTS = $(am_pgadmin3_OBJECTS) pgAdmin3.res
...

pgAdmin3.res: ui/pgAdmin3.rc
    $(WINDRES) --include-dir=$(WX_HOME)/include --include-dir=ui  -i
ui/pgAdmin3.rc -I rc -o pgAdmin3.res -O coff


MinGW build is working after those changes. Unfortunatelly I'm not that god
in autoconf/automake to make those changes myself.



Regards !