Change '--with-odbc' to use the WX_ARG_SYS_WITH macro instead of
the WX_ARG_WITH macro. Add some extra rules to find the new correct linker flags. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
32
Makefile.in
32
Makefile.in
@@ -286,22 +286,22 @@ TIFFOBJS = \
|
|||||||
tif_write.o \
|
tif_write.o \
|
||||||
tif_zip.o
|
tif_zip.o
|
||||||
|
|
||||||
# IODBCOBJS = \
|
IODBCOBJS = \
|
||||||
# catalog.o \
|
catalog.o \
|
||||||
# connect.o \
|
connect.o \
|
||||||
# dlf.o \
|
dlf.o \
|
||||||
# dlproc.o \
|
dlproc.o \
|
||||||
# execute.o \
|
execute.o \
|
||||||
# fetch.o \
|
fetch.o \
|
||||||
# hdbc.o \
|
hdbc.o \
|
||||||
# henv.o \
|
henv.o \
|
||||||
# herr.o \
|
herr.o \
|
||||||
# hstmt.o \
|
hstmt.o \
|
||||||
# info.o \
|
info.o \
|
||||||
# itrace.o \
|
itrace.o \
|
||||||
# misc.o \
|
misc.o \
|
||||||
# prepare.o \
|
prepare.o \
|
||||||
# result.o
|
result.o
|
||||||
|
|
||||||
|
|
||||||
############################## Rules ##################################
|
############################## Rules ##################################
|
||||||
|
54
configure.in
54
configure.in
@@ -715,7 +715,7 @@ dnl for GUI only
|
|||||||
WX_ARG_WITH(dmalloc, [ --with-dmalloc use dmalloc library (http://dmalloc.com/)], wxUSE_DMALLOC)
|
WX_ARG_WITH(dmalloc, [ --with-dmalloc use dmalloc library (http://dmalloc.com/)], wxUSE_DMALLOC)
|
||||||
WX_ARG_SYS_WITH(regex, [ --with-regex enable support for wxRegEx class], wxUSE_REGEX)
|
WX_ARG_SYS_WITH(regex, [ --with-regex enable support for wxRegEx class], wxUSE_REGEX)
|
||||||
WX_ARG_SYS_WITH(zlib, [ --with-zlib use zlib for LZW compression], wxUSE_ZLIB)
|
WX_ARG_SYS_WITH(zlib, [ --with-zlib use zlib for LZW compression], wxUSE_ZLIB)
|
||||||
WX_ARG_WITH(odbc, [ --with-odbc use the IODBC and wxODBC classes], wxUSE_ODBC)
|
WX_ARG_SYS_WITH(odbc, [ --with-odbc use the IODBC and wxODBC classes], wxUSE_ODBC)
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl compile options
|
dnl compile options
|
||||||
@@ -2081,9 +2081,14 @@ if test "$USE_WIN32" = 1 ; then
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
dnl add extra odbc libs if we have compiled in odbc
|
dnl add extra odbc libs if we have compiled in odbc
|
||||||
|
if test "$wxUSE_ODBC" = "sys" ; then
|
||||||
|
wxUSE_ODBC = "yes"
|
||||||
|
fi
|
||||||
if test "$wxUSE_ODBC" = "yes" ; then
|
if test "$wxUSE_ODBC" = "yes" ; then
|
||||||
LIBS=" -lodbc32 -lole32 -loleaut32 $LIBS"
|
LIBS=" -lodbc32 -lole32 -loleaut32 $LIBS"
|
||||||
|
AC_DEFINE(wxUSE_ODBC)
|
||||||
fi
|
fi
|
||||||
|
dnl We might want to abort here if wxUSE_ODBC="builtin" isn't supported on msw.
|
||||||
|
|
||||||
RESFLAGS="--include-dir \$(top_srcdir)/include --include-dir \$(top_srcdir)/\$(program_dir) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__"
|
RESFLAGS="--include-dir \$(top_srcdir)/include --include-dir \$(top_srcdir)/\$(program_dir) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__"
|
||||||
RESPROGRAMOBJ="\$(PROGRAM)_resources.o"
|
RESPROGRAMOBJ="\$(PROGRAM)_resources.o"
|
||||||
@@ -2754,10 +2759,41 @@ dnl ---------------------------------------------------------------------------
|
|||||||
dnl Optional libraries included when system library is not used
|
dnl Optional libraries included when system library is not used
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
|
|
||||||
dnl ODBC objects are Unix only
|
|
||||||
if test "$TOOLKIT" != "MSW" -a "$wxUSE_ODBC" = "yes" ; then
|
dnl ----------------------------------------------------------------
|
||||||
|
dnl iODBC support
|
||||||
|
dnl ----------------------------------------------------------------
|
||||||
|
|
||||||
|
IODBC_C_SRC=""
|
||||||
|
|
||||||
|
|
||||||
|
dnl ODBC is handled seperately for MSW
|
||||||
|
if test "$TOOLKIT" != "MSW" ; then
|
||||||
|
|
||||||
|
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 ])
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl Not "no" either...
|
||||||
|
if test "$wxUSE_ODBC" != "sys" ; then
|
||||||
|
AC_MSG_WARN( [ can't find system Odbc library falling back to builtin ])
|
||||||
ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)"
|
ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_REGEX" = "builtin" ; then
|
if test "$wxUSE_REGEX" = "builtin" ; then
|
||||||
ALL_OBJECTS="${ALL_OBJECTS} \$(REGEXOBJS)"
|
ALL_OBJECTS="${ALL_OBJECTS} \$(REGEXOBJS)"
|
||||||
@@ -4657,18 +4693,6 @@ if test "$wxUSE_wxUSE_EXPERIMENTAL_PRINTF" = "yes"; then
|
|||||||
AC_DEFINE(wxUSE_EXPERIMENTAL_PRINTF)
|
AC_DEFINE(wxUSE_EXPERIMENTAL_PRINTF)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
|
||||||
dnl iODBC support
|
|
||||||
dnl ----------------------------------------------------------------
|
|
||||||
|
|
||||||
IODBC_C_SRC=""
|
|
||||||
if test "$wxUSE_ODBC" = "yes" ; then
|
|
||||||
AC_DEFINE(wxUSE_ODBC)
|
|
||||||
WXODBCFLAG="-D_IODBC_"
|
|
||||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS db"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
dnl Register PostScript options for makefiles and setup.h
|
dnl Register PostScript options for makefiles and setup.h
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user