Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Commit

Permalink
Attached is a patch to autoconf which makes the following changes:
Browse files Browse the repository at this point in the history
*) Adds support for wxWindows 2.5 (--enable-wx25)
*) Adds support for release version of pgadmin3 (--enable-release)

*DO NOT* use the --enable-release flag yet to configure.  I still have
to work out what a "release" build really means, and what a "debug"
build means.  It may require the use of the "-static" flag to gcc
again, which causes a lot of dependency problems which will take some
time to track down.  --enable-wx25 is safe and test, however (at least
by me!).

ahp


git-svn-id: svn://svn.pgadmin.org/trunk@1259 a7884b65-44f6-0310-8a51-81a127f17b15
  • Loading branch information
dpage committed Jun 2, 2003
1 parent a8a9c44 commit a5e72f8
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 16 deletions.
82 changes: 66 additions & 16 deletions acinclude.m4
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
###################################################
# Check if release version of PgAdmin3 is desired #
###################################################
AC_DEFUN([ENABLE_RELEASE],
[AC_ARG_ENABLE(release,
[ --enable-release build release version of PgAdmin3],
[pg_release_build=yes],
[pg_release_build=no])
])

############################################################
# Check to see if a build against wxWindows 2.5 is desired #
############################################################
AC_DEFUN([ENABLE_WX25],
[AC_ARG_ENABLE(wx25,
[ --enable-wx25 build against wxWindows 2.5],
[wx_version=2.5],
[wx_version=2.4])
])

########################################
# Check for PostgreSQL library (libpq) #
########################################
AC_DEFUN([CHECK_LIBPQ],
[AC_MSG_CHECKING(for pgsql)
AC_ARG_WITH(pgsql,
Expand Down Expand Up @@ -49,6 +72,9 @@ then
fi
])

##################################
# Check for wxWindows sub-system #
##################################
AC_DEFUN([CHECK_WXWINDOWS],
[AC_MSG_CHECKING(for wxWindows)
AC_ARG_WITH(wx,
Expand Down Expand Up @@ -87,28 +113,52 @@ fi], [
LDFLAGS="$LDFLAGS -L${WX_HOME}/lib"
WX_OLD_LDFLAGS=$LDFLAGS
WX_OLD_CPPFLAGS=$CPPFLAGS
WX_NEW_LDFLAGS=`${WX_CONFIG} --libs --static`
if test -f "${WX_HOME}/lib/libstc.a"
if test "$pg_release_build" == "yes"
then
LIBS="$LIBS -lwxxrc -lstc $WX_NEW_LDFLAGS"
WX_NEW_LDFLAGS=`${WX_CONFIG} --libs --shared`
else
case "${host}" in
*-*-linux-*)
LIBS="$LIBS -lwx_gtkd_stc-2.4 -lwx_gtkd_xrc-2.4"
LIBS="$LIBS $WX_NEW_LDFLAGS" ;;
*-apple-darwin*)
LIBS="$LIBS -lwx_macd_stc-2.4 -lwx_macd_xrc-2.4"
LIBS="$LIBS $WX_NEW_LDFLAGS"
LDFLAGS="$LDFLAGS -flat_namespace" ;;
*) ;;
esac
WX_NEW_LDFLAGS=`${WX_CONFIG} --libs --static`
fi
if test "$pg_release_build" == "yes"; then
if test -f "${WX_HOME}/lib/libstc.so"
then
LIBS="$LIBS -lwxxrc -lstc $WX_NEW_LDFLAGS"
else
case "${host}" in
*-*-linux-*)
LIBS="$LIBS -lwx_gtkd_stc-${wx_version} -lwx_gtkd_xrc-${wx_version}"
LIBS="$LIBS $WX_NEW_LDFLAGS" ;;
*-apple-darwin*)
LIBS="$LIBS -lwx_macd_stc-${wx_version} -lwx_macd_xrc-${wx_version}"
LIBS="$LIBS $WX_NEW_LDFLAGS"
LDFLAGS="$LDFLAGS -flat_namespace" ;;
*) ;;
esac
fi
else
if test -f "${WX_HOME}/lib/libstc.a"
then
LIBS="$LIBS -lwxxrc -lstc $WX_NEW_LDFLAGS"
else
case "${host}" in
*-*-linux-*)
LIBS="$LIBS -lwx_gtkd_stc-${wx_version} -lwx_gtkd_xrc-${wx_version}"
LIBS="$LIBS $WX_NEW_LDFLAGS" ;;
*-apple-darwin*)
LIBS="$LIBS -lwx_macd_stc-${wx_version} -lwx_macd_xrc-${wx_version}"
LIBS="$LIBS $WX_NEW_LDFLAGS"
LDFLAGS="$LDFLAGS -flat_namespace" ;;
*) ;;
esac
fi
fi
WX_NEW_CPPFLAGS=`${WX_CONFIG} --cxxflags`
CPPFLAGS="$CPPFLAGS $WX_NEW_CPPFLAGS"
case "${host}" in
*-apple-darwin*)
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -fno-rtti" ;;
*) ;;
*-apple-darwin*)
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -fno-rtti" ;;
*) ;;
esac
AC_LANG_SAVE
AC_LANG_C
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ AC_HEADER_TIME
AC_FUNC_STRTOD
AC_CHECK_FUNCS([gethostbyname inet_ntoa memmove memset strchr])

# Custom checks
ENABLE_RELEASE
ENABLE_WX25
CHECK_LIBPQ
CHECK_WXWINDOWS

Expand Down

0 comments on commit a5e72f8

Please sign in to comment.