if test "$wxUSE_DEBUG" = "yes"; then
DEFAULT_wxUSE_DEBUG_FLAG=yes
DEFAULT_wxUSE_DEBUG_INFO=yes
+ BUILD=debug
elif test "$wxUSE_DEBUG" = "no"; then
DEFAULT_wxUSE_DEBUG_FLAG=no
DEFAULT_wxUSE_DEBUG_INFO=no
+ BUILD=release
fi
WX_ARG_ENABLE(debug_flag, [ --enable-debug_flag set __WXDEBUG__ flag (recommended for developers!)], wxUSE_DEBUG_FLAG)
## FIXME: This is a blatant hack
if test "x$wxUSE_COCOA" != "x" -a "$wxUSE_COCOA" != "0" ; then
wxUSE_PRINTING_ARCHITECTURE=no
- wxUSE_CLIPBOARD=no
wxUSE_DRAG_AND_DROP=no
- wxUSE_DATAOBJ=no
# Generic notebook requires tab dialog
DEFAULT_wxUSE_TABDIALOG=yes
DEFAULT_wxUSE_TOOLBAR_NATIVE=no
dnl ODBC is handled seperately for MSW
if test "$TOOLKIT" != "MSW" ; then
+ if test "$wxUSE_ODBC" = "sys" -o "$wxUSE_ODBC" = "yes" ; then
+ dnl This is not ideal we really ough to use the unixodbc-config
+ dnl or iodbc-config if they exist.
+
+ AC_CHECK_HEADER([sql.h], [found_sql_h=1])
+ if test "x$found_sql_h" = "x1" ; then
+ AC_CHECK_LIB(SQLAllocEnv, iodbc, ODBC_LINK=" -liodbc",
+ [
+ AC_CHECK_LIB(SQLAllocEnv, unixodbc, ODBC_LINK=" -lunixodbc",
+ [
+ AC_CHECK_LIB(SQLAllocEnv, odbc, ODBC_LINK=" -lodbc")
+ ])
+ ])
+ fi
+ if test "x$ODBC_LINK" = "x" ; then
+ if test "$wxUSE_ODBC" = "sys" ; then
+ AC_MSG_ERROR([system ODBC library not found! Use --with-odbc=builtin to use built-in version])
+ else
+ AC_MSG_WARN([system ODBC library not found, will use built-in instead])
+ wxUSE_ODBC=builtin
+ fi
+ else
+ dnl we are using the system library
+ wxUSE_ODBC=sys
+ fi
+ fi
if test "$wxUSE_ODBC" != "no" ; then
AC_DEFINE(wxUSE_ODBC)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS db"
dnl is this still necessary in 2.5?
WXODBCFLAG="-D_IODBC_"
-
-
- if test "$wxUSE_ODBC" = "sys" ; then
- dnl This is not ideal we really ough to use the unixodbc-config
- dnl or iodbc-config if they exist.
-
- AC_CHECK_HEADER(sql.h)
- AC_SEARCH_LIBS(SQLAllocEnv,iodbc unixodbc odbc , , [
- wxUSE_ODBC=builtin;
- AC_MSG_WARN( [ can't find system Odbc library falling back to builtin ])
- ] )
- fi
- dnl Not "no" either...
- if test "$wxUSE_ODBC" != "sys" ; then
- ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)"
- fi
-
fi
-
fi
if test "$wxUSE_REGEX" = "builtin" ; then
WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, GL/gl.h)
if test "$ac_find_includes" != "" ; then
AC_MSG_RESULT(found in $ac_find_includes)
- set -x
WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS)
CPPFLAGS="$CPPFLAGS$ac_path_to_include"
- set +x
fi
AC_CHECK_HEADER(GL/gl.h,
fi
fi
- if "$found_gl" != 1; then
+ if test "$found_gl" != 1; then
AC_MSG_RESULT([no])
AC_MSG_CHECKING([for -lMesaGL])
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],MesaGL)
fi
lib_debug_suffix=
-BUILD=release
+DEBUG_FLAG=0
if test "$wxUSE_DEBUG_FLAG" = "yes"; then
lib_debug_suffix=d
- BUILD=debug
+ DEBUG_FLAG=1
fi
-WX_VERSION_TAG=`echo WX${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}_${WX_RELEASE} | tr "[[a-z]]" "[[A-Z]]"`
+DEBUG_INFO=0
+if test "$wxUSE_DEBUG_INFO" = "yes"; then
+ DEBUG_INFO=1
+fi
+
+WX_VERSION_TAG=`echo WX${lib_unicode_suffix}${lib_debug_suffix}_${WX_RELEASE} | tr "[[a-z]]" "[[A-Z]]"`
TOOLCHAIN_NAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}-${WX_RELEASE}"
TOOLCHAIN_NAME_GL="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}_gl-${WX_RELEASE}"
dnl ------------------------------------------
dnl Check for ESD:
-ESD_LINK=
-AC_CHECK_HEADER([esd.h], [
- AC_CHECK_LIB(esd, esd_close, [
- ESD_LINK="-lesd"
+EXTRALIBS_ESD=
+AC_CHECK_LIB(esd, esd_close, [
+ AC_CHECK_HEADERS([esd.h], [
+ EXTRALIBS_ESD="-lesd"
])
])
+AC_SUBST(EXTRALIBS_ESD)
dnl ===========================================================================
AC_MSG_WARN([Joystick not yet supported under Mac OS X... disabled])
wxUSE_JOYSTICK=no
fi
- if test "$TOOLKIT" = "MOTIF"; then
- AC_MSG_WARN([Joystick not yet supported under Motif... disabled])
- wxUSE_JOYSTICK=no
- fi
- if test "$TOOLKIT" = "X11"; then
- AC_MSG_WARN([Joystick not yet supported under X11... disabled])
- wxUSE_JOYSTICK=no
- fi
-
- dnl under MSW we always have joystick support
+
+ dnl under MSW we always have joystick support
if test "$TOOLKIT" != "MSW"; then
if test "$wxUSE_JOYSTICK" = "yes"; then
dnl joystick support is only for Linux 2.1.x or greater
if test "$wxUSE_DYNAMIC_LOADER" = "yes" ; then
AC_DEFINE(wxUSE_DYNAMIC_LOADER)
-elif test "$wxUSE_DYNLIB_CLASS" = "yes" ; then
+fi
+if test "$wxUSE_DYNLIB_CLASS" = "yes" ; then
AC_DEFINE(wxUSE_DYNLIB_CLASS)
fi
if test "$wxUSE_SYSTEM_OPTIONS" = "yes"; then
AC_DEFINE(wxUSE_SYSTEM_OPTIONS)
-if test "$TOOLKIT" = "MSW"; then
+if test "$TOOLKIT" = "MSW" -o "$TOOLKIT" = "GTK" -o "$TOOLKIT" = "X11" -o \
+ "$TOOLKIT" = "MOTIF"; then
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS taskbar"
fi
dnl define the variables used in wx-config
top_builddir_wxconfig=`pwd`
+
+dnl ---------------------------------------------------------------------------
+dnl define variables with all built libraries for wx-config
+dnl ---------------------------------------------------------------------------
+
+CORE_BASE_LIBS="net base"
+CORE_GUI_LIBS="adv core"
+
+if test "$wxUSE_XML" = "yes" ; then
+ CORE_BASE_LIBS="xml $CORE_BASE_LIBS"
+fi
+if test "$wxUSE_ODBC" != "no" ; then
+ CORE_BASE_LIBS="odbc $CORE_BASE_LIBS"
+ CORE_GUI_LIBS="dbgrid $CORE_GUI_LIBS"
+fi
+if test "$wxUSE_HTML" = "yes" ; then
+ CORE_GUI_LIBS="html $CORE_GUI_LIBS"
+fi
+
+AC_SUBST(CORE_BASE_LIBS)
+AC_SUBST(CORE_GUI_LIBS)
+
+
dnl ---------------------------------------------------------------------------
dnl Output the makefiles and such from the results found above
dnl ---------------------------------------------------------------------------
LIBS=`echo $LIBS | sed 's/ \+/ /g'`
EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS"
EXTRALIBS_XML="$EXPAT_LINK"
+EXTRALIBS_ODBC="$ODBC_LINK"
if test "$wxUSE_GUI" = "yes"; then
EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK | sed 's/ \+/ /g'`
fi
if test "$wxUSE_ZLIB" = "builtin" ; then
wxconfig_3rdparty="$wxconfig_3rdparty zlib"
fi
+if test "$wxUSE_ODBC" = "builtin" ; then
+ wxconfig_3rdparty="$wxconfig_3rdparty odbc"
+fi
for i in $wxconfig_3rdparty ; do
WXCONFIG_EXTRALIBS="$WXCONFIG_EXTRALIBS -lwx${i}${lib_debug_suffix}${HOST_SUFFIX}"
MONOLITHIC=0
fi
+if test $wxUSE_ODBC != "no" ; then
+ USE_ODBC=1
+else
+ USE_ODBC=0
+fi
+
if test $wxUSE_OFFICIAL_BUILD = "yes" ; then
OFFICIAL_BUILD=1
else
AC_SUBST(LIBS)
AC_SUBST(EXTRALIBS)
AC_SUBST(EXTRALIBS_XML)
+AC_SUBST(EXTRALIBS_ODBC)
AC_SUBST(EXTRALIBS_GUI)
AC_SUBST(EXTRALIBS_OPENGL)
AC_SUBST(UNICODE)
AC_SUBST(BUILD)
+AC_SUBST(DEBUG_INFO)
+AC_SUBST(DEBUG_FLAG)
AC_SUBST(SHARED)
TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr [[A-Z]] [[a-z]]`
AC_SUBST(TOOLKIT_LOWERCASE)
AC_SUBST(INSTALL_LIBRARY)
AC_SUBST(INSTALL_DIR)
-dnl contrib tests results:
-AC_SUBST(ESD_LINK)
-
dnl MAKE_SET will be replaced with "MAKE=..." or nothing if make sets MAKE
dnl itself (this macro is required if SUBDIRS variable is used in Makefile.am