Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit81b30f2

Browse files
committed
Integrated ODBC driver into regular build. No more standalone business,
which didn't work anyway. Had to back out unixodbc related patch whichbroke the regular ODBC build.
1 parente3b3746 commit81b30f2

19 files changed

+607
-6349
lines changed

‎configure

Lines changed: 497 additions & 688 deletions
Large diffs are not rendered by default.

‎configure.in

Lines changed: 34 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -497,99 +497,41 @@ AC_DEFINE_UNQUOTED(PG_KRB_SRVTAB, ["$krb_srvtab"], [The location of the Kerberos
497497

498498

499499

500-
dnl We include odbc support unless we disable it with --with-odbc=false
501-
AC_MSG_CHECKING(setting USE_ODBC)
502-
AC_ARG_WITH(
503-
odbc,
504-
[ --with-odbc build ODBC driver package ],
505-
[
506-
case "$withval" in
507-
y | ye | yes)USE_ODBC=true; AC_MSG_RESULT(enabled) ;;
508-
*)USE_ODBC=false; AC_MSG_RESULT(disabled) ;;
509-
esac
510-
],
511-
[ USE_ODBC=false; AC_MSG_RESULT(disabled) ]
512-
)
513-
export USE_ODBC
500+
dnl
501+
dnl Optionally enable the building of the ODBC driver
502+
dnl
503+
504+
dnl Old option name
505+
if test "x${with_odbc+set}" = xset && test "x${enable_odbc+set}" != xset; then
506+
enable_odbc=$with_odbc
507+
fi
508+
509+
AC_MSG_CHECKING(whether to build the ODBC driver)
510+
AC_ARG_ENABLE(odbc, [ --enable-odbc build the ODBC driver package],
511+
[if test x"$enableval" = x"yes" ; then
512+
AC_MSG_RESULT(yes)
513+
else
514+
AC_MSG_RESULT(no)
515+
fi],
516+
[AC_MSG_RESULT(no)])
517+
AC_SUBST(enable_odbc)
514518

515-
dnl check if we want to use unixODBC to provide access to the odbc.ini
516-
dnl files
517-
518-
use_unixODBC=no
519-
AC_MSG_CHECKING(setting USE_UNIXODBC)
520-
AC_ARG_WITH(
521-
unixODBC,
522-
[ --with-unixODBC[=DIR] Use unixODBC located in DIR],
523-
[
524-
use_unixODBC=yes;
525-
unixODBC="$withval";
526-
USE_ODBC=true;
527-
AC_MSG_RESULT(enabled);
528-
],
529-
[ USE_ODBC=false; use_unixODBC=no; AC_MSG_RESULT(disabled) ]
530-
)
531-
export USE_ODBC
532519

533520
dnl Allow for overriding the default location of the odbcinst.ini
534-
dnl file which is normally ${prefix}/share or ${prefix} if this is
535-
dnl being compiled inside the postgres distribution.
536-
dnl Link in the port and template directories
537-
dnl to help build a "standalone ODBC" tar file
538-
if test "X$USE_ODBC" = "Xtrue"
539-
then
540-
AC_LINK_FILES(src/include/port, src/interfaces/odbc/port)
541-
AC_LINK_FILES(src/makefiles, src/interfaces/odbc/makefiles)
542-
AC_LINK_FILES(src/template, src/interfaces/odbc/template)
543-
AC_LINK_FILES(src/include/config.h, src/interfaces/odbc/config.h)
544-
545-
AC_MSG_CHECKING(setting ODBCINST)
546-
AC_ARG_WITH(
547-
odbcinst,
548-
[ --with-odbcinst=DIR change default directory for odbcinst.ini],
549-
AC_DEFINE_UNQUOTED(ODBCINST, ${with_odbcinst}) AC_MSG_RESULT($with_odbcinst),
550-
AC_DEFINE_UNQUOTED(ODBCINST, ${ODBCINSTDIR}) AC_MSG_RESULT(${ODBCINSTDIR})
551-
)
521+
dnl file which is normally ${datadir} (i.e., ${prefix}/share).
522+
if test x"$enable_odbc" = x"yes" ; then
523+
AC_ARG_WITH(odbcinst, [ --with-odbcinst=DIR default directory for odbcinst.ini [datadir]],
524+
[if test x"$with_odbcinst" = x"yes" || test x"$with_odbcinst" = x"no" ; then
525+
AC_MSG_ERROR([You must supply an argument to the --with-odbcinst option.])
552526
fi
553-
if test "X$with_odbcinst" != "X"
554-
then
555-
ODBCINSTDIR=$with_odbcinst
527+
odbcinst_ini_dir=$withval],
528+
[odbcinst_ini_dir='${datadir}'])
529+
else
530+
odbcinst_ini_dir='${datadir}'
556531
fi
557-
AC_SUBST(ODBCINSTDIR)
558-
559-
#check for unixODBC libs
532+
AC_SUBST(odbcinst_ini_dir)
560533

561-
if test "x$use_unixODBC" = "xyes"
562-
then
563534

564-
# default to /usr/local if not specified
565-
if test "x$unixODBC" = "x"
566-
then
567-
unixODBC="/usr/local";
568-
fi
569-
570-
unixODBC_libs="$unixODBC/lib"
571-
unixODBC_includes="$unixODBC/include"
572-
573-
INCLUDES="$INCLUDES -I$unixODBC_includes"
574-
AC_CHECK_HEADERS(sql.h sqlext.h odbcinst.h,
575-
unixODBC_ok=yes;
576-
odbc_headers="$odbc_headers $ac_hdr",
577-
unixODBC_ok=no )
578-
579-
if test "x$unixODBC_ok" != "xyes"
580-
then
581-
AC_MSG_ERROR([Unable to find the unixODBC headers in $1])
582-
fi
583-
584-
save_LIBS="$LIBS"
585-
LIBS="-L$unixODBC_libs $LIBS"
586-
587-
AC_CHECK_LIB(odbcinst,SQLGetPrivateProfileString,
588-
[AC_DEFINE(HAVE_SQL_GET_PRIV_PROFILE)
589-
SHLIB_ODBC="$LDFLAGS_ODBC -L$unixODBC_libs -lodbcinst" ],
590-
[LIBS="$save_LIBS"] )
591-
fi
592-
export SHLIB_ODBC
593535

594536
dnl Unless we specify the command line options
595537
dnl--enable cassertto explicitly enable it
@@ -658,8 +600,6 @@ AC_SUBST(DL_LIB)
658600
AC_SUBST(USE_TCL)
659601
AC_SUBST(USE_TK)
660602
AC_SUBST(WISH)
661-
AC_SUBST(USE_ODBC)
662-
AC_SUBST(SHLIB_ODBC)
663603
AC_SUBST(MULTIBYTE)
664604

665605

@@ -699,13 +639,16 @@ case "$host_os" in
699639
hpux*)
700640
INSTL_SHLIB_OPTS="-m 555" ;;
701641
esac
702-
703-
AC_SUBST(INSTALL)
704642
AC_SUBST(INSTLOPTS)
705643
AC_SUBST(INSTL_LIB_OPTS)
706644
AC_SUBST(INSTL_SHLIB_OPTS)
707645
AC_SUBST(INSTL_EXE_OPTS)
708646

647+
648+
INSTALL_SHLIB="\${INSTALL} $INST_SHLIB_OPTS"
649+
AC_SUBST(INSTALL_SHLIB)
650+
651+
709652
AC_PROG_AWK
710653

711654
AC_PROG_LEX
@@ -788,9 +731,8 @@ AC_CHECK_HEADERS(unistd.h)
788731
AC_CHECK_HEADERS(values.h)
789732
AC_CHECK_HEADERS(sys/exec.h sys/pstat.h machine/vmparam.h)
790733
AC_CHECK_HEADERS(sys/types.h sys/socket.h)
791-
dnl ODBC headers...
792734
AC_CHECK_HEADERS(sys/param.h pwd.h)
793-
dnl
735+
794736

795737
dnl Checks for typedefs, structures, and compiler characteristics.
796738
AC_C_CONST
@@ -1241,26 +1183,6 @@ See the file 'config.log' for further diagnostics.])
12411183
LDFLAGS="$ice_save_LDFLAGS"
12421184
fi
12431185

1244-
dnl cause configure to recurse into subdirectories with their own configure
1245-
dnl Darn, setting AC_CONFIG_SUBDIRS sets a list $subdirs$ in the configure output
1246-
dnl file, but then configure doesn't bother using that list. Probably a bug in
1247-
dnl this version of autoconf.
1248-
dnl So at the moment interfaces/odbc gets configured unconditionally.
1249-
dnl - thomas 1998-10-05
1250-
#if test "X$USE_ODBC" = "Xtrue"
1251-
#then
1252-
#AC_CONFIG_SUBDIRS(interfaces/odbc)
1253-
#fi
1254-
if test "$USE_ODBC" = "true"
1255-
then
1256-
PWD_INCDIR=no
1257-
AC_CHECK_HEADER(pwd.h, PWD_INCDIR=yes)
1258-
if test "$PWD_INCDIR" = "no"; then
1259-
AC_MSG_WARN(odbc support disabled; pwd.h missing)
1260-
USE_ODBC=
1261-
fi
1262-
AC_SUBST(USE_ODBC)
1263-
fi
12641186

12651187
dnl Output files that are neither makefiles nor shell scripts probably
12661188
dnl need fully-expanded substitutions, rather than partial expansions
@@ -1304,7 +1226,6 @@ AC_OUTPUT(
13041226
src/interfaces/libpgeasy/Makefile
13051227
src/interfaces/libpgtcl/Makefile
13061228
src/interfaces/odbc/GNUmakefile
1307-
src/interfaces/odbc/Makefile.global
13081229
src/interfaces/python/GNUmakefile
13091230
src/pl/Makefile
13101231
src/pl/plpgsql/src/Makefile

‎src/Makefile.global.in

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.79 2000/06/17 00:09:31 petere Exp $
10+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.80 2000/06/19 16:58:35 petere Exp $
1111
#
1212
# NOTES
1313
# Essentially all Postgres make files include this file and use the
@@ -89,10 +89,6 @@ POSTDOCDIR= $(POSTGRESDIR)/doc
8989
# Where the header files necessary to build frontend programs get installed.
9090
HEADERDIR= $(POSTGRESDIR)/include
9191

92-
# Where the ODBC installation-wide configuration file gets installed.
93-
# This needs to be a client-side readable area, so can't go in $PGDATA.
94-
# - thomas 1998-10-05
95-
ODBCINST= $(POSTGRESDIR)
9692

9793
##############################################################################
9894
#

‎src/include/config.h.in

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* or in config.h afterwards. Of course, if you edit config.h, then your
99
* changes will be overwritten the next time you run configure.
1010
*
11-
* $Id: config.h.in,v 1.119 2000/06/17 00:09:56 petere Exp $
11+
* $Id: config.h.in,v 1.120 2000/06/19 16:58:37 petere Exp $
1212
*/
1313

1414
#ifndefCONFIG_H
@@ -283,9 +283,6 @@
283283
/* Define if you have the ANSI C header files. */
284284
#undef STDC_HEADERS
285285

286-
/* default path for the location of the odbcinst.ini file */
287-
#undef ODBCINST
288-
289286
/* Define if you have the setproctitle function. */
290287
#undef HAVE_SETPROCTITLE
291288

@@ -305,9 +302,6 @@
305302
* Block of parameters for the ODBC code.
306303
*/
307304

308-
/* are we building against a libodbcinst */
309-
#undef HAVE_SQLGETPRIVATEPROFILESTRING
310-
311305
/* Set to 1 if you have <pwd.h> */
312306
#undef HAVE_PWD_H
313307

‎src/interfaces/Makefile.in

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $Header: /cvsroot/pgsql/src/interfaces/Attic/Makefile.in,v 1.2 2000/06/11 11:39:59 petere Exp $
7+
# $Header: /cvsroot/pgsql/src/interfaces/Attic/Makefile.in,v 1.3 2000/06/19 16:58:43 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -13,9 +13,10 @@ VPATH = @srcdir@
1313

1414
top_srcdir = @top_srcdir@
1515
top_builddir = ../..
16+
subdir = src/interfaces
1617

1718
USE_TCL = @USE_TCL@
18-
USE_ODBC = @USE_ODBC@
19+
enable_odbc = @enable_odbc@
1920
with_CXX = @with_CXX@
2021
with_perl = @with_perl@
2122
with_python = @with_python@
@@ -36,26 +37,28 @@ endif
3637
ifeq ($(with_python), yes)
3738
$(MAKE) -C python $@
3839
endif
39-
ifeq ($(USE_ODBC),true)
40+
ifeq ($(enable_odbc),yes)
4041
$(MAKE) -C odbc $@
4142
endif
4243

4344
distcleanmaintainer-clean: clean
4445
-$(MAKE) -C perl5$@
4546
-$(MAKE) -C python$@
47+
-$(MAKE) -C odbc$@
4648
rm -f Makefile\
4749
libpq/Makefile\
4850
ecpg/lib/Makefile\
4951
ecpg/preproc/Makefile\
5052
libpq++/Makefile\
5153
libpgeasy/Makefile\
52-
libpgtcl/Makefile\
53-
odbc/GNUmakefile\
54-
odbc/Makefile.global\
55-
odbc/port\
56-
odbc/makefiles\
57-
odbc/template\
58-
odbc/config.h
54+
libpgtcl/Makefile
5955

6056

6157
.PHONY: all install dep depend clean distclean maintainer-clean
58+
59+
60+
GNUmakefile: GNUmakefile.in$(top_builddir)/config.status
61+
CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
62+
63+
$(top_builddir)/config.status:$(top_srcdir)/configure
64+
cd$(top_builddir)&& ./config.status --recheck

‎src/interfaces/odbc/Config.mk

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp