mirror of https://github.com/postgres/postgres
which didn't work anyway. Had to back out unixodbc related patch which broke the regular ODBC build.REL7_1_STABLE
parent
e3b37462c2
commit
81b30f2cb4
@ -1,43 +0,0 @@ |
|||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
#============ Default for all system ==============
|
|
||||||
OS = UNX
|
|
||||||
SHELL = /bin/sh
|
|
||||||
AR = ar r
|
|
||||||
DLSUFFIX= so
|
|
||||||
INCDIR = /include
|
|
||||||
OBJX =
|
|
||||||
RANLIB = ranlib
|
|
||||||
INSTALL = /usr/bin/install
|
|
||||||
INSTALL_DATA = $(INSTALL) -c -m 644
|
|
||||||
MKDIR = mkdir
|
|
||||||
DESTDIR = /usr/local
|
|
||||||
LIBDIR = /lib
|
|
||||||
INSTHEADERS = isql.h isqlext.h iodbc.h
|
|
||||||
DESTLIBDIR = $(DESTDIR)$(LIBDIR)
|
|
||||||
DESTINCDIR = $(DESTDIR)$(INCDIR)/iodbc
|
|
||||||
ODBCSYSTEMDIR = /usr/home/gryschuk
|
|
||||||
|
|
||||||
# Remove the comment characters from the section you want to
|
|
||||||
# use below, make sure all other sections are commented out.
|
|
||||||
|
|
||||||
#============== Linux ELF =========================
|
|
||||||
CC = gcc
|
|
||||||
PIC = -fPIC
|
|
||||||
CFLAGSX = -g
|
|
||||||
#CFLAGSX = -g -Wall -DMY_LOG -DQ_LOG
|
|
||||||
LDFLAGS = -shared
|
|
||||||
LIBS = -ldl
|
|
||||||
|
|
||||||
#============= FreeBSD 2.x ========================
|
|
||||||
# I don't know if this would work but you can always just try it.
|
|
||||||
# PIC = -fPIC
|
|
||||||
# CFLAGSX = -g -Wall
|
|
||||||
# LDFLAGS = -Bshareable
|
|
||||||
# LIBS =
|
|
||||||
|
|
||||||
#===| end of file 'Config.mk' |===
|
|
||||||
|
|
||||||
|
|
@ -1,208 +0,0 @@ |
|||||||
#----------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Makefile.global--
|
|
||||||
# global configuration for pgsqlodbc (Postgres ODBC driver)
|
|
||||||
#
|
|
||||||
# Copyright (c) 1994, Regents of the University of California
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# IDENTIFICATION
|
|
||||||
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/Makefile.global.in,v 1.4 1998/10/19 00:00:49 tgl Exp $
|
|
||||||
#
|
|
||||||
# NOTES
|
|
||||||
# This is derived from the main Postgres makefile.
|
|
||||||
#
|
|
||||||
# When running standalone:
|
|
||||||
# To override the default setting, create a Makefile.custom in this
|
|
||||||
# directory and put your defines there. (Makefile.custom is included
|
|
||||||
# near the end of this file). Sometimes, a variable gets set in
|
|
||||||
# Makefile.global after Makefile.custom has been included, so you can't
|
|
||||||
# simply set that variable in Makefile.custom. In those cases, there is
|
|
||||||
# often another variable (like CUSTOM_COPT) that you can set in
|
|
||||||
# Makefile.custom that influences the later setting of the true variable
|
|
||||||
# of interest (like CFLAGS) by Makefile.global.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# If you change any of these defines you probably have to
|
|
||||||
# make clean; make
|
|
||||||
# since no dependencies are created for these. (of course you can
|
|
||||||
# be crafty and check what files really depend on them and just remake
|
|
||||||
# those).
|
|
||||||
#
|
|
||||||
# Before including this file, you must set the SRCDIR variable to the
|
|
||||||
# path of the top of the Postgres source tree (the directory that
|
|
||||||
# contains this file).
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# CONFIGURATION SECTION
|
|
||||||
#
|
|
||||||
# Following are settings pertaining to the postgres build and
|
|
||||||
# installation.
|
|
||||||
# of the port.
|
|
||||||
#
|
|
||||||
# Ignore LINUX_ELF if you're not using Linux. But if you are, and you're
|
|
||||||
# compiling to a.out (which means you're using the dld dynamic loading
|
|
||||||
# library), set LINUX_ELF to null in Makefile.custom.
|
|
||||||
LINUX_ELF= true
|
|
||||||
#
|
|
||||||
# Ignore BSD_SHLIB if you're not using one of the BSD ports. But if you
|
|
||||||
# are, and it's one that doesn't have shared libraries (NetBSD/vax is an
|
|
||||||
# example of this), set BSD_SHLIB to null in Makefile.custom.
|
|
||||||
BSD_SHLIB= true
|
|
||||||
|
|
||||||
# For convenience, POSTGRESDIR is where BINDIR, and LIBDIR
|
|
||||||
# and other target destinations are rooted. Of course, each of these is
|
|
||||||
# changable separately.
|
|
||||||
|
|
||||||
POSTGRESDIR=@prefix@
|
|
||||||
|
|
||||||
# Where the postgres executables live (changeable by just putting them
|
|
||||||
# somewhere else and putting that directory in your shell PATH)
|
|
||||||
BINDIR= $(POSTGRESDIR)/bin
|
|
||||||
|
|
||||||
# Where libpsqlodbc.a gets installed. You must put it where your loader will
|
|
||||||
# look for it if you wish to use the -lpq convention. Otherwise you
|
|
||||||
# can just put the absolute pathname to the library at the end of your
|
|
||||||
# command line.
|
|
||||||
|
|
||||||
LIBDIR= $(POSTGRESDIR)/lib
|
|
||||||
|
|
||||||
## Where the man pages (suitable for use with "man") get installed.
|
|
||||||
#POSTMANDIR= $(POSTGRESDIR)/man
|
|
||||||
#
|
|
||||||
# Where the formatted documents (e.g., the reference manual) get installed.
|
|
||||||
#POSTDOCDIR= $(POSTGRESDIR)/doc
|
|
||||||
|
|
||||||
# Where the header files necessary to build frontend programs get installed.
|
|
||||||
HEADERDIR= $(POSTGRESDIR)/include
|
|
||||||
|
|
||||||
# Where the odbcinst.ini file will be placed
|
|
||||||
|
|
||||||
ODBCINST= @ODBCINST@
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# FEATURES
|
|
||||||
#
|
|
||||||
# To disable a feature, comment out the entire definition
|
|
||||||
# (that is, prepend '#', don't set it to "0" or "no").
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Installation.
|
|
||||||
#
|
|
||||||
# For many ports, INSTALL is overridden below.
|
|
||||||
INSTALL= @INSTALL@
|
|
||||||
RANLIB= @RANLIB@
|
|
||||||
|
|
||||||
INSTLOPTS= @INSTLOPTS@
|
|
||||||
INSTL_EXE_OPTS= @INSTL_EXE_OPTS@
|
|
||||||
INSTL_LIB_OPTS= @INSTL_LIB_OPTS@
|
|
||||||
INSTL_SHLIB_OPTS= @INSTL_SHLIB_OPTS@
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# For building shell scripts:
|
|
||||||
#
|
|
||||||
# For many ports, these are overridden below.
|
|
||||||
|
|
||||||
# DASH_N is what we put before the text on an echo command when we don't
|
|
||||||
# want a trailing newline. BACKSLASH_C is what we put at the end of the
|
|
||||||
# string on a echo command when we don't want a trailing newline. On
|
|
||||||
# some systems, you do echo -n "no newline after this", while on others
|
|
||||||
# you do echo "no newline after this\c".
|
|
||||||
|
|
||||||
DASH_N= @DASH_N@
|
|
||||||
BACKSLASH_C= @BACKSLASH_C@
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------
|
|
||||||
# See the subdirectory template for default settings for these
|
|
||||||
#-------------------------------------------------------------
|
|
||||||
CC= @CC@
|
|
||||||
AROPT= @AROPT@
|
|
||||||
CFLAGS= -I$(ODBCSRCDIR) @CPPFLAGS@ @CFLAGS@
|
|
||||||
CFLAGS_SL= @SHARED_LIB@
|
|
||||||
LDFLAGS= @LDFLAGS@ @LIBS@
|
|
||||||
DLSUFFIX= @DLSUFFIX@
|
|
||||||
LN_S = @LN_S@
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Additional platform-specific settings
|
|
||||||
#
|
|
||||||
|
|
||||||
PORTNAME= @PORTNAME@
|
|
||||||
|
|
||||||
ifneq ($(wildcard $(SRCDIR)/Makefile.port), ) |
|
||||||
include $(SRCDIR)/Makefile.port
|
|
||||||
endif |
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Customization.
|
|
||||||
#
|
|
||||||
# This includes local customizations. If we're being built from
|
|
||||||
# within the Postgres distribution and a Makefile.custom exists
|
|
||||||
# in the top level Postgres directory it will take precedence
|
|
||||||
# over any local Makefile.custom in the odbc driver directory.
|
|
||||||
|
|
||||||
ifneq ($(wildcard $(SRCDIR)/Makefile.custom), ) |
|
||||||
include $(SRCDIR)/Makefile.custom
|
|
||||||
endif |
|
||||||
|
|
||||||
|
|
||||||
# This goes here so that customization in Makefile.custom is effective
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
ifneq ($(CUSTOM_INSTALL),) |
|
||||||
INSTALL= $(CUSTOM_INSTALL)
|
|
||||||
endif |
|
||||||
|
|
||||||
#
|
|
||||||
# Flags for CC and LD.
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# COPT
|
|
||||||
#
|
|
||||||
# COPT is for options that the sophisticated builder might want to vary
|
|
||||||
# from one build to the next, like options to build Postgres with debugging
|
|
||||||
# information included. COPT is meant to be set on the make command line,
|
|
||||||
# for example with the command "make COPT=-g". The value you see set here
|
|
||||||
# is the default that gets used if the builder does not give a value for
|
|
||||||
# COPT on his make command.
|
|
||||||
#
|
|
||||||
# There is a nonobvious relationship between -O (optimization) and
|
|
||||||
# -Werror (consider all warnings fatal). On some systems, if you don't
|
|
||||||
# optimize, you will always get some warnings because the system header
|
|
||||||
# files will include some unreferenced functions in the code. These are
|
|
||||||
# functions that are supposed to be inline, so there wouldn't ordinarily
|
|
||||||
# be an "unreferenced" problem, but if you don't enable optimization, no
|
|
||||||
# inlining can happen, and hence the problem. Therefore, we include
|
|
||||||
# if you override -O, you override -Werror as well.
|
|
||||||
#
|
|
||||||
# CUSTOM_COPT is something the user may set in Makefile.custom
|
|
||||||
|
|
||||||
# Common values for COPT are: -g for debuggable binaries, -m486 if you are
|
|
||||||
# using a i486 or better.
|
|
||||||
|
|
||||||
ifneq ($(CUSTOM_CC),) |
|
||||||
CC= $(CUSTOM_CC)
|
|
||||||
endif |
|
||||||
|
|
||||||
ifneq ($(CUSTOM_COPT),) |
|
||||||
COPT= $(CUSTOM_COPT)
|
|
||||||
endif |
|
||||||
|
|
||||||
ifeq ($(CC), gcc) |
|
||||||
CFLAGS+= -Wall -Wmissing-prototypes
|
|
||||||
endif |
|
||||||
|
|
||||||
ifdef COPT |
|
||||||
CFLAGS+= $(COPT)
|
|
||||||
endif |
|
@ -1,5 +0,0 @@ |
|||||||
VERSION = 0.26
|
|
||||||
EXTVER = .0
|
|
||||||
|
|
||||||
SO_MAJOR_VERSION = 0
|
|
||||||
SO_MINOR_VERSION = 26
|
|
@ -1,2 +0,0 @@ |
|||||||
/* default path for the location of the odbcinst.ini file */ |
|
||||||
#undef ODBCINST |
|
File diff suppressed because it is too large
Load Diff
@ -1,25 +0,0 @@ |
|||||||
/* config.h.in. Generated automatically from configure.in by autoheader. */ |
|
||||||
|
|
||||||
/* Define if you have the ANSI C header files. */ |
|
||||||
#undef STDC_HEADERS |
|
||||||
|
|
||||||
/* default path for the location of the odbcinst.ini file */ |
|
||||||
#undef ODBCINST |
|
||||||
|
|
||||||
/* Define if you have the stricmp function. */ |
|
||||||
#undef HAVE_STRICMP |
|
||||||
|
|
||||||
/* Define if you have the <pwd.h> header file. */ |
|
||||||
#undef HAVE_PWD_H |
|
||||||
|
|
||||||
/* Define if you have the <sys/param.h> header file. */ |
|
||||||
#undef HAVE_SYS_PARAM_H |
|
||||||
|
|
||||||
/* Define if you have the c library (-lc). */ |
|
||||||
#undef HAVE_LIBC |
|
||||||
|
|
||||||
/* Define if you have the dl library (-ldl). */ |
|
||||||
#undef HAVE_LIBDL |
|
||||||
|
|
||||||
/* Define if you have the m library (-lm). */ |
|
||||||
#undef HAVE_LIBM |
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,332 +0,0 @@ |
|||||||
dnl psqlodbc standalone configuration. |
|
||||||
dnl Process this file with autoconf to produce a configure script. |
|
||||||
|
|
||||||
dnl Confirm that this is being run from the ODBC source directory, |
|
||||||
dnl and halt if not... |
|
||||||
AC_INIT(bind.c) |
|
||||||
AC_PREFIX_DEFAULT(/usr/local) |
|
||||||
|
|
||||||
echo "*** configuring psqlodbc ***" |
|
||||||
|
|
||||||
if test -d ../../interfaces |
|
||||||
then |
|
||||||
echo "psqlodbc can be configured either standalone or integrated" |
|
||||||
echo "into the Postgres main distribution." |
|
||||||
echo "It appears that you are running the standalone configure" |
|
||||||
echo "from within the main distribution. The recommended (and required)" |
|
||||||
echo "procedure is to configure ODBC using the integrated configuration" |
|
||||||
echo "procedure using the --with-odbc option." |
|
||||||
exit |
|
||||||
fi |
|
||||||
|
|
||||||
TEMPLATEDIR=./template |
|
||||||
if test "$prefix" = "NONE" |
|
||||||
then |
|
||||||
if test -d "/share" |
|
||||||
then |
|
||||||
ODBCINST=/share/odbcinst.ini |
|
||||||
else |
|
||||||
ODBCINST=/etc/odbcinst.ini |
|
||||||
fi |
|
||||||
else |
|
||||||
ODBCINST=$prefix/odbcinst.ini |
|
||||||
fi |
|
||||||
|
|
||||||
AC_CANONICAL_HOST |
|
||||||
|
|
||||||
case "$host_os" in |
|
||||||
solaris*) |
|
||||||
case "$host_cpu" in |
|
||||||
sparc) os=solaris_sparc ;; |
|
||||||
i386) os=solaris_i386 ;; |
|
||||||
esac ;; |
|
||||||
sunos*) os=sunos4 ;; |
|
||||||
aux*) os=aux ;; |
|
||||||
linux*) os=linux ;; |
|
||||||
bsdi*) os=bsdi ;; |
|
||||||
freebsd*|netbsd*|openbsd*) os=bsd ;; |
|
||||||
dgux*) os=dgux ;; |
|
||||||
aix*) os=aix ;; |
|
||||||
nextstep*) os=nextstep ;; |
|
||||||
ultrix*) os=ultrix4 ;; |
|
||||||
irix*) os=irix5 ;; |
|
||||||
hpux*) os=hpux ;; |
|
||||||
osf*) os=alpha ;; |
|
||||||
sco*) os=sco ;; |
|
||||||
machten*) os=machten ;; |
|
||||||
cygwin*) os=win ;; |
|
||||||
sysv4.2*) |
|
||||||
case "$host_vendor" in |
|
||||||
univel) os=univel ;; |
|
||||||
*) os=unknown ;; |
|
||||||
esac ;; |
|
||||||
sysv4*) os=svr4 ;; |
|
||||||
*) echo "" |
|
||||||
echo "*************************************************************" |
|
||||||
echo "configure does not currently recognize your operating system," |
|
||||||
echo "therefore you must do a manual configuration of:" |
|
||||||
echo "$host_os" |
|
||||||
echo "Please contact scrappy@hub.org to see about rectifying this, " |
|
||||||
echo "including the above 'checking host system type...' line " |
|
||||||
echo "*************************************************************" |
|
||||||
echo "" |
|
||||||
exit;; |
|
||||||
esac |
|
||||||
|
|
||||||
|
|
||||||
PORTNAME=${os} |
|
||||||
AC_LINK_FILES(makefiles/Makefile.${os}, Makefile.port) |
|
||||||
|
|
||||||
echo "checking echo setting..." |
|
||||||
if echo '\c' | grep -s c >/dev/null 2>&1 |
|
||||||
then |
|
||||||
ECHO_N="echo -n" |
|
||||||
ECHO_C="" |
|
||||||
else |
|
||||||
ECHO_N="echo" |
|
||||||
ECHO_C='\c' |
|
||||||
fi |
|
||||||
|
|
||||||
dnl cat <<EOT |
|
||||||
dnl ************************************************************** |
|
||||||
dnl Postodbc v0.0250 Installation Program |
|
||||||
dnl |
|
||||||
dnl Welcome to the new improved Postodbc installation program. |
|
||||||
dnl This configuration program is for version 0.0250 of the |
|
||||||
dnl Postodbc software. |
|
||||||
dnl |
|
||||||
dnl EOT |
|
||||||
|
|
||||||
dnl this part selects the template from the one in the |
|
||||||
dnl template directory. |
|
||||||
|
|
||||||
dnl if test "X$with_template" != "X" |
|
||||||
dnl then |
|
||||||
dnl TEMPLATE=template/$with_template |
|
||||||
dnl else |
|
||||||
dnl TEMPLATE=DO_NOT_CHANGE_THIS_INVALID_FILENAME |
|
||||||
dnl fi |
|
||||||
|
|
||||||
AC_MSG_CHECKING(setting template to) |
|
||||||
AC_ARG_WITH(template, |
|
||||||
[ --with-template=TEMPLATE |
|
||||||
use operating system template file; see template directory], |
|
||||||
[ TEMPLATE=$withval ], |
|
||||||
[ host_no_ver=`echo "$host" | sed 's/[[0-9.]]*$//'` |
|
||||||
GUESS=`grep "$host_no_ver" $TEMPLATEDIR/.similar | sed 's/.*=//' | tail -1` |
|
||||||
if test "$GUESS" |
|
||||||
then TEMPLATE="$GUESS" |
|
||||||
else TEMPLATE=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
|
||||||
fi |
|
||||||
]) |
|
||||||
AC_MSG_RESULT($TEMPLATE) |
|
||||||
|
|
||||||
if test ! -d "$TEMPLATEDIR" |
|
||||||
then |
|
||||||
cat << EOT |
|
||||||
************************************************************** |
|
||||||
You seem to be missing the template directory needed by |
|
||||||
configure. If you just copied the source from the Postgres |
|
||||||
distribution you should instead have issued the command |
|
||||||
'make standalone' which would have built a distribution |
|
||||||
containing the necessary template directory. The other |
|
||||||
option is that your trying to build from the source |
|
||||||
which is meant to be placed in the Postgres distribution |
|
||||||
directory 'interfaces/odbc'. Depending on your case either get the |
|
||||||
standalone source from the following Web site: |
|
||||||
|
|
||||||
www.insightdist.com/psqlodbc/ |
|
||||||
|
|
||||||
or issue the 'make standalone' command from the |
|
||||||
'interfaces/odbc' directory of your Postgres Distribution, |
|
||||||
or copy the distribution file you have to your Postgres |
|
||||||
distribution's 'interfaces/odbc' directory and try |
|
||||||
again. |
|
||||||
|
|
||||||
If neither of these is the case than please complain |
|
||||||
kindly to the maintainers; their e-mail addresses can |
|
||||||
be found in the Readme files. |
|
||||||
************************************************************* |
|
||||||
EOT |
|
||||||
|
|
||||||
exit |
|
||||||
else |
|
||||||
|
|
||||||
if test ! -f "$TEMPLATEDIR/$TEMPLATE" |
|
||||||
then |
|
||||||
cat <<EOT |
|
||||||
Please select a template from the ones listed below. If no |
|
||||||
template is available, then select the 'generic' one and |
|
||||||
consider emailling scrappy@hub.org with the above line which |
|
||||||
starts 'checking host system type...' |
|
||||||
************************************************************** |
|
||||||
EOT |
|
||||||
TEMPLATE=generic |
|
||||||
GUESS=`grep "^$host_no_ver=" $TEMPLATEDIR/.similar 2>/dev/null` |
|
||||||
if test ! "$GUESS" |
|
||||||
then host_no_ver=`echo "$host" | sed 's/[[0-9.]]*$//'` |
|
||||||
GUESS=`grep "$host_no_ver" $TEMPLATEDIR/.similar 2>/dev/null` |
|
||||||
fi |
|
||||||
if test "$GUESS" |
|
||||||
then |
|
||||||
TEMPLATE=`echo $GUESS | sed 's/.*=//'` |
|
||||||
fi |
|
||||||
export TEMPLATE |
|
||||||
ls $TEMPLATEDIR |
|
||||||
echo "**************************************************************" |
|
||||||
$ECHO_N "Appropriate template file { $TEMPLATE }: $ECHO_C" |
|
||||||
read a |
|
||||||
if test "$a." != "." |
|
||||||
then |
|
||||||
TEMPLATE=$a |
|
||||||
fi |
|
||||||
if test ! -f $TEMPLATEDIR/$TEMPLATE |
|
||||||
then |
|
||||||
echo "You must choose an appropriate template file." |
|
||||||
exit |
|
||||||
fi |
|
||||||
fi |
|
||||||
fi |
|
||||||
|
|
||||||
TEMPLATE=$TEMPLATEDIR/$TEMPLATE |
|
||||||
export TEMPLATE |
|
||||||
echo "" |
|
||||||
|
|
||||||
AROPT=`grep '^AROPT:' $TEMPLATE | awk -F: '{print $2}'` |
|
||||||
SHARED_LIB=`grep '^SHARED_LIB:' $TEMPLATE | awk -F: '{print $2}'` |
|
||||||
CFLAGS=`grep '^CFLAGS:' $TEMPLATE | awk -F: '{print $2}'` |
|
||||||
SRCH_INC=`grep '^SRCH_INC:' $TEMPLATE | awk -F: '{print $2}'` |
|
||||||
SRCH_LIB=`grep '^SRCH_LIB:' $TEMPLATE | awk -F: '{print $2}'` |
|
||||||
DLSUFFIX=`grep '^DLSUFFIX:' $TEMPLATE | awk -F: '{print $2}'` |
|
||||||
DL_LIB=`grep '^DL_LIB:' $TEMPLATE | awk -F: '{print $2}'` |
|
||||||
CC=`grep '^CC:' $TEMPLATE | awk -F: '{print $2}'` |
|
||||||
LIBS=`grep '^LIBS:' $TEMPLATE | awk -F: '{print $2}'` |
|
||||||
|
|
||||||
|
|
||||||
a=$SRCH_INC |
|
||||||
CPPFLAGS=`echo "$a" | sed 's@ *@ @g; s@^\([[^ ]]\)@-I\1@; s@ \([[^ ]]\)@ -I\1@g'` |
|
||||||
|
|
||||||
export CPPFLAGS |
|
||||||
echo "- setting CPPFLAGS=$CPPFLAGS" |
|
||||||
|
|
||||||
a=$SRCH_LIB |
|
||||||
LDFLAGS=`echo "$a" | sed 's@ *@ @g; s@^\([[^ ]]\)@-L\1@; s@ \([[^ ]]\)@ -L\1@g'` |
|
||||||
|
|
||||||
export LDFLAGS |
|
||||||
echo "- setting LDFLAGS=$LDFLAGS" |
|
||||||
|
|
||||||
dnl Allow for overriding the default location of the odbcinst.ini |
|
||||||
dnl file which is normally ${prefix}/share or ${prefix} if this is |
|
||||||
dnl being compiled inside the postgres distribution. |
|
||||||
AC_MSG_CHECKING(setting ODBCINST) |
|
||||||
AC_ARG_WITH( |
|
||||||
odbcinst, |
|
||||||
[ --with-odbcinst=<pathname> |
|
||||||
change default directory for odbcinst.ini ], |
|
||||||
AC_DEFINE_UNQUOTED(ODBCINST, ${with_odbcinst}) AC_MSG_RESULT($with_odbcinst), |
|
||||||
AC_DEFINE_UNQUOTED(ODBCINST, /etc/odbcinst.ini) AC_MSG_RESULT(${ODBCINST}) |
|
||||||
) |
|
||||||
|
|
||||||
AC_SUBST(ODBCINST) |
|
||||||
|
|
||||||
if test "X$with_compiler" != "X" |
|
||||||
then |
|
||||||
CC=$with_compiler |
|
||||||
else |
|
||||||
AC_PROG_CC |
|
||||||
fi |
|
||||||
|
|
||||||
AC_CONFIG_HEADER(config.h) |
|
||||||
|
|
||||||
dnl Checks for programs. |
|
||||||
AC_PROG_CPP |
|
||||||
|
|
||||||
AC_SUBST(PORTNAME) |
|
||||||
AC_SUBST(LDFLAGS) |
|
||||||
AC_SUBST(CPPFLAGS) |
|
||||||
AC_SUBST(AROPT) |
|
||||||
AC_SUBST(SHARED_LIB) |
|
||||||
AC_SUBST(CFLAGS) |
|
||||||
AC_SUBST(DLSUFFIX) |
|
||||||
AC_SUBST(DL_LIB) |
|
||||||
|
|
||||||
INSTALLPATH="`echo /usr/ucb:$PATH | sed 's/:/ /g'`" |
|
||||||
AC_PATH_PROGS(INSTALL, ginstall installbsd bsdinst scoinst install, NONE, $INSTALLPATH ) |
|
||||||
if test $INSTALL = "NONE" |
|
||||||
then |
|
||||||
echo "- No Install Script found - aborting." |
|
||||||
exit 0; |
|
||||||
fi |
|
||||||
|
|
||||||
INSTLOPTS="-m 444" |
|
||||||
INSTL_EXE_OPTS="-m 555" |
|
||||||
INSTL_LIB_OPTS="-m 644" |
|
||||||
INSTL_SHLIB_OPTS="-m 644" |
|
||||||
|
|
||||||
dnl HPUX wants shared libs to be mode 555. |
|
||||||
case "$host_os" in |
|
||||||
hpux*) |
|
||||||
INSTL_SHLIB_OPTS="-m 555" ;; |
|
||||||
esac |
|
||||||
|
|
||||||
dnl These flavors of install need -c to install by copy rather than move. |
|
||||||
dnl install by move is fatal because it removes stuff from the source tree! |
|
||||||
case "`basename $INSTALL`" in |
|
||||||
install|installbsd|scoinst|install-sh) |
|
||||||
INSTLOPTS="-c $INSTLOPTS" |
|
||||||
INSTL_EXE_OPTS="-c $INSTL_EXE_OPTS" |
|
||||||
INSTL_LIB_OPTS="-c $INSTL_LIB_OPTS" |
|
||||||
INSTL_SHLIB_OPTS="-c $INSTL_SHLIB_OPTS";; |
|
||||||
esac |
|
||||||
|
|
||||||
echo "- Using $INSTALL" |
|
||||||
AC_SUBST(INSTALL) |
|
||||||
AC_SUBST(INSTLOPTS) |
|
||||||
AC_SUBST(INSTL_LIB_OPTS) |
|
||||||
AC_SUBST(INSTL_SHLIB_OPTS) |
|
||||||
AC_SUBST(INSTL_EXE_OPTS) |
|
||||||
|
|
||||||
dnl Check the option to echo to inhibit newlines. |
|
||||||
ECHO_N_OUT=`echo -n "" | wc -c` |
|
||||||
ECHO_C_OUT=`echo "\c" | wc -c` |
|
||||||
if test "$ECHO_N_OUT" -eq 0; then |
|
||||||
DASH_N='-n' |
|
||||||
BACKSLASH_C= |
|
||||||
else |
|
||||||
if test "ECHO_C_OUT" -eq 0; then |
|
||||||
DASH_N= |
|
||||||
BACKSLASH_C='\\\\c' |
|
||||||
else |
|
||||||
AC_MSG_ERROR("echo behaviour undetermined") |
|
||||||
fi |
|
||||||
fi |
|
||||||
AC_SUBST(DASH_N) |
|
||||||
AC_SUBST(BACKSLASH_C) |
|
||||||
|
|
||||||
AC_PROG_LN_S |
|
||||||
AC_PROG_MAKE_SET |
|
||||||
AC_PROG_RANLIB |
|
||||||
AC_PATH_PROG(find, find) |
|
||||||
AC_PATH_PROG(tar, tar) |
|
||||||
AC_PATH_PROG(split,split) |
|
||||||
|
|
||||||
AC_CHECK_LIB(c, main) |
|
||||||
AC_CHECK_LIB(m, main) |
|
||||||
AC_CHECK_LIB(dl, main) |
|
||||||
|
|
||||||
dnl Checks for header files. |
|
||||||
AC_HEADER_STDC |
|
||||||
AC_CHECK_HEADERS(sys/param.h pwd.h) |
|
||||||
|
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics. |
|
||||||
|
|
||||||
dnl Check for any "odd" conditions |
|
||||||
|
|
||||||
dnl Checks for library functions. |
|
||||||
AC_CHECK_FUNCS(stricmp) |
|
||||||
|
|
||||||
dnl Check for X libraries |
|
||||||
|
|
||||||
dnl Check for X library |
|
||||||
|
|
||||||
AC_OUTPUT(GNUmakefile Makefile.global) |
|
@ -1,250 +0,0 @@ |
|||||||
#! /bin/sh |
|
||||||
# |
|
||||||
# install - install a program, script, or datafile |
|
||||||
# This comes from X11R5 (mit/util/scripts/install.sh). |
|
||||||
# |
|
||||||
# Copyright 1991 by the Massachusetts Institute of Technology |
|
||||||
# |
|
||||||
# Permission to use, copy, modify, distribute, and sell this software and its |
|
||||||
# documentation for any purpose is hereby granted without fee, provided that |
|
||||||
# the above copyright notice appear in all copies and that both that |
|
||||||
# copyright notice and this permission notice appear in supporting |
|
||||||
# documentation, and that the name of M.I.T. not be used in advertising or |
|
||||||
# publicity pertaining to distribution of the software without specific, |
|
||||||
# written prior permission. M.I.T. makes no representations about the |
|
||||||
# suitability of this software for any purpose. It is provided "as is" |
|
||||||
# without express or implied warranty. |
|
||||||
# |
|
||||||
# Calling this script install-sh is preferred over install.sh, to prevent |
|
||||||
# `make' implicit rules from creating a file called install from it |
|
||||||
# when there is no Makefile. |
|
||||||
# |
|
||||||
# This script is compatible with the BSD install script, but was written |
|
||||||
# from scratch. It can only install one file at a time, a restriction |
|
||||||
# shared with many OS's install programs. |
|
||||||
|
|
||||||
|
|
||||||
# set DOITPROG to echo to test this script |
|
||||||
|
|
||||||
# Don't use :- since 4.3BSD and earlier shells don't like it. |
|
||||||
doit="${DOITPROG-}" |
|
||||||
|
|
||||||
|
|
||||||
# put in absolute paths if you don't have them in your path; or use env. vars. |
|
||||||
|
|
||||||
mvprog="${MVPROG-mv}" |
|
||||||
cpprog="${CPPROG-cp}" |
|
||||||
chmodprog="${CHMODPROG-chmod}" |
|
||||||
chownprog="${CHOWNPROG-chown}" |
|
||||||
chgrpprog="${CHGRPPROG-chgrp}" |
|
||||||
stripprog="${STRIPPROG-strip}" |
|
||||||
rmprog="${RMPROG-rm}" |
|
||||||
mkdirprog="${MKDIRPROG-mkdir}" |
|
||||||
|
|
||||||
transformbasename="" |
|
||||||
transform_arg="" |
|
||||||
instcmd="$mvprog" |
|
||||||
chmodcmd="$chmodprog 0755" |
|
||||||
chowncmd="" |
|
||||||
chgrpcmd="" |
|
||||||
stripcmd="" |
|
||||||
rmcmd="$rmprog -f" |
|
||||||
mvcmd="$mvprog" |
|
||||||
src="" |
|
||||||
dst="" |
|
||||||
dir_arg="" |
|
||||||
|
|
||||||
while [ x"$1" != x ]; do |
|
||||||
case $1 in |
|
||||||
-c) instcmd="$cpprog" |
|
||||||
shift |
|
||||||
continue;; |
|
||||||
|
|
||||||
-d) dir_arg=true |
|
||||||
shift |
|
||||||
continue;; |
|
||||||
|
|
||||||
-m) chmodcmd="$chmodprog $2" |
|
||||||
shift |
|
||||||
shift |
|
||||||
continue;; |
|
||||||
|
|
||||||
-o) chowncmd="$chownprog $2" |
|
||||||
shift |
|
||||||
shift |
|
||||||
continue;; |
|
||||||
|
|
||||||
-g) chgrpcmd="$chgrpprog $2" |
|
||||||
shift |
|
||||||
shift |
|
||||||
continue;; |
|
||||||
|
|
||||||
-s) stripcmd="$stripprog" |
|
||||||
shift |
|
||||||
continue;; |
|
||||||
|
|
||||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'` |
|
||||||
shift |
|
||||||
continue;; |
|
||||||
|
|
||||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'` |
|
||||||
shift |
|
||||||
continue;; |
|
||||||
|
|
||||||
*) if [ x"$src" = x ] |
|
||||||
then |
|
||||||
src=$1 |
|
||||||
else |
|
||||||
# this colon is to work around a 386BSD /bin/sh bug |
|
||||||
: |
|
||||||
dst=$1 |
|
||||||
fi |
|
||||||
shift |
|
||||||
continue;; |
|
||||||
esac |
|
||||||
done |
|
||||||
|
|
||||||
if [ x"$src" = x ] |
|
||||||
then |
|
||||||
echo "install: no input file specified" |
|
||||||
exit 1 |
|
||||||
else |
|
||||||
true |
|
||||||
fi |
|
||||||
|
|
||||||
if [ x"$dir_arg" != x ]; then |
|
||||||
dst=$src |
|
||||||
src="" |
|
||||||
|
|
||||||
if [ -d $dst ]; then |
|
||||||
instcmd=: |
|
||||||
else |
|
||||||
instcmd=mkdir |
|
||||||
fi |
|
||||||
else |
|
||||||
|
|
||||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command |
|
||||||
# might cause directories to be created, which would be especially bad |
|
||||||
# if $src (and thus $dsttmp) contains '*'. |
|
||||||
|
|
||||||
if [ -f $src -o -d $src ] |
|
||||||
then |
|
||||||
true |
|
||||||
else |
|
||||||
echo "install: $src does not exist" |
|
||||||
exit 1 |
|
||||||
fi |
|
||||||
|
|
||||||
if [ x"$dst" = x ] |
|
||||||
then |
|
||||||
echo "install: no destination specified" |
|
||||||
exit 1 |
|
||||||
else |
|
||||||
true |
|
||||||
fi |
|
||||||
|
|
||||||
# If destination is a directory, append the input filename; if your system |
|
||||||
# does not like double slashes in filenames, you may need to add some logic |
|
||||||
|
|
||||||
if [ -d $dst ] |
|
||||||
then |
|
||||||
dst="$dst"/`basename $src` |
|
||||||
else |
|
||||||
true |
|
||||||
fi |
|
||||||
fi |
|
||||||
|
|
||||||
## this sed command emulates the dirname command |
|
||||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` |
|
||||||
|
|
||||||
# Make sure that the destination directory exists. |
|
||||||
# this part is taken from Noah Friedman's mkinstalldirs script |
|
||||||
|
|
||||||
# Skip lots of stat calls in the usual case. |
|
||||||
if [ ! -d "$dstdir" ]; then |
|
||||||
defaultIFS=' |
|
||||||
' |
|
||||||
IFS="${IFS-${defaultIFS}}" |
|
||||||
|
|
||||||
oIFS="${IFS}" |
|
||||||
# Some sh's can't handle IFS=/ for some reason. |
|
||||||
IFS='%' |
|
||||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` |
|
||||||
IFS="${oIFS}" |
|
||||||
|
|
||||||
pathcomp='' |
|
||||||
|
|
||||||
while [ $# -ne 0 ] ; do |
|
||||||
pathcomp="${pathcomp}${1}" |
|
||||||
shift |
|
||||||
|
|
||||||
if [ ! -d "${pathcomp}" ] ; |
|
||||||
then |
|
||||||
$mkdirprog "${pathcomp}" |
|
||||||
else |
|
||||||
true |
|
||||||
fi |
|
||||||
|
|
||||||
pathcomp="${pathcomp}/" |
|
||||||
done |
|
||||||
fi |
|
||||||
|
|
||||||
if [ x"$dir_arg" != x ] |
|
||||||
then |
|
||||||
$doit $instcmd $dst && |
|
||||||
|
|
||||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && |
|
||||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && |
|
||||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && |
|
||||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi |
|
||||||
else |
|
||||||
|
|
||||||
# If we're going to rename the final executable, determine the name now. |
|
||||||
|
|
||||||
if [ x"$transformarg" = x ] |
|
||||||
then |
|
||||||
dstfile=`basename $dst` |
|
||||||
else |
|
||||||
dstfile=`basename $dst $transformbasename | |
|
||||||
sed $transformarg`$transformbasename |
|
||||||
fi |
|
||||||
|
|
||||||
# don't allow the sed command to completely eliminate the filename |
|
||||||
|
|
||||||
if [ x"$dstfile" = x ] |
|
||||||
then |
|
||||||
dstfile=`basename $dst` |
|
||||||
else |
|
||||||
true |
|
||||||
fi |
|
||||||
|
|
||||||
# Make a temp file name in the proper directory. |
|
||||||
|
|
||||||
dsttmp=$dstdir/#inst.$$# |
|
||||||
|
|
||||||
# Move or copy the file name to the temp name |
|
||||||
|
|
||||||
$doit $instcmd $src $dsttmp && |
|
||||||
|
|
||||||
trap "rm -f ${dsttmp}" 0 && |
|
||||||
|
|
||||||
# and set any options; do chmod last to preserve setuid bits |
|
||||||
|
|
||||||
# If any of these fail, we abort the whole thing. If we want to |
|
||||||
# ignore errors from any of these, just make sure not to ignore |
|
||||||
# errors from the above "$doit $instcmd $src $dsttmp" command. |
|
||||||
|
|
||||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && |
|
||||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && |
|
||||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && |
|
||||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && |
|
||||||
|
|
||||||
# Now rename the file to the real destination. |
|
||||||
|
|
||||||
$doit $rmcmd -f $dstdir/$dstfile && |
|
||||||
$doit $mvcmd $dsttmp $dstdir/$dstfile |
|
||||||
|
|
||||||
fi && |
|
||||||
|
|
||||||
|
|
||||||
exit 0 |
|
Loading…
Reference in new issue