@@ -14,10 +14,10 @@ ac_default_prefix=/usr/local
14
14
ac_default_prefix=/usr/local
15
15
ac_help=" $ac_help
16
16
--with-template=TEMPLATE
17
- use operating system template file
18
- see template directory"
17
+ use operating system template file; see template directory"
19
18
ac_help=" $ac_help
20
- --with-odbcinst=<datadir> change default directory for odbcinst.ini"
19
+ --with-odbcinst=<pathname>
20
+ change default directory for odbcinst.ini "
21
21
22
22
# Initialize some variables set by options.
23
23
# The variables have the same names as the options, with
527
527
528
528
529
529
530
+ echo " *** configuring psqlodbc ***"
531
+
530
532
if test -d ../../interfaces
531
533
then
532
- TEMPLATEDIR=../../template
533
- if test " $prefix " = " NONE"
534
- then
535
- ac_default_prefix=/usr/local/pgsql
536
- fi
537
- ODBCINSTDIR=
538
- else
539
- TEMPLATEDIR=./template
540
- if test " $prefix " = " NONE"
534
+ echo " psqlodbc can be configured either standalone or integrated"
535
+ echo " into the Postgres main distribution."
536
+ echo " It appears that you are running the standalone configure"
537
+ echo " from within the main distribution. The recommended (and required)"
538
+ echo " procedure is to configure ODBC using the integrated configuration"
539
+ echo " procedure using the --with-odbc option."
540
+ exit
541
+ fi
542
+
543
+ TEMPLATEDIR=./template
544
+ if test " $prefix " = " NONE"
545
+ then
546
+ if test -d " /share"
541
547
then
542
- ODBCINSTDIR =/share
548
+ ODBCINST =/share/odbcinst.ini
543
549
else
544
- ODBCINSTDIR=
550
+ ODBCINST=/etc/odbcinst.ini
545
551
fi
552
+ else
553
+ ODBCINST=$prefix /odbcinst.ini
546
554
fi
547
555
548
- echo " *** configuring psqlodbc ***"
549
-
550
556
ac_aux_dir=
551
557
for ac_dir in $srcdir $srcdir /.. $srcdir /../..; do
552
558
if test -f $ac_dir /install-sh; then
@@ -573,7 +579,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
573
579
fi
574
580
575
581
echo $ac_n " checking host system type" " ... $ac_c " 1>&6
576
- echo " configure:577 : checking host system type" >&5
582
+ echo " configure:583 : checking host system type" >&5
577
583
578
584
host_alias=$host
579
585
case " $host_alias " in
637
643
PORTNAME=${os}
638
644
639
645
640
-
641
646
echo " checking echo setting..."
642
647
if echo ' \c' | grep -s c > /dev/null 2>&1
643
648
then
652
657
653
658
654
659
echo $ac_n " checking setting template to" " ... $ac_c " 1>&6
655
- echo " configure:656 : checking setting template to" >&5
660
+ echo " configure:661 : checking setting template to" >&5
656
661
# Check whether --with-template or --without-template was given.
657
662
if test " ${with_template+set} " = set ; then
658
663
withval=" $with_template "
@@ -692,7 +697,7 @@ distribution's 'interfaces/odbc' directory and try
692
697
again.
693
698
694
699
If neither of these is the case than please complain
695
- kindly to the maintainers, their e-mail addresses can
700
+ kindly to the maintainers; their e-mail addresses can
696
701
be found in the Readme files.
697
702
*************************************************************
698
703
EOT
@@ -764,7 +769,7 @@ export LDFLAGS
764
769
echo " - setting LDFLAGS=$LDFLAGS "
765
770
766
771
echo $ac_n " checking setting ODBCINST" " ... $ac_c " 1>&6
767
- echo " configure:768 : checking setting ODBCINST" >&5
772
+ echo " configure:773 : checking setting ODBCINST" >&5
768
773
# Check whether --with-odbcinst or --without-odbcinst was given.
769
774
if test " ${with_odbcinst+set} " = set ; then
770
775
withval=" $with_odbcinst "
@@ -774,18 +779,13 @@ EOF
774
779
echo " $ac_t " " $with_odbcinst " 1>&6
775
780
else
776
781
cat >> confdefs.h << EOF
777
- #define ODBCINST ${ODBCINSTDIR}
782
+ #define ODBCINST /etc/odbcinst.ini
778
783
EOF
779
- echo " $ac_t " " ${ODBCINSTDIR } " 1>&6
784
+ echo " $ac_t " " ${ODBCINST } " 1>&6
780
785
781
786
fi
782
787
783
788
784
- if test " X$with_odbcinst " ! = " X"
785
- then
786
- ODBCINSTDIR=$with_odbcinst
787
- fi
788
-
789
789
790
790
791
791
if test " X$with_compiler " ! = " X"
@@ -1755,10 +1755,10 @@ s%@host_alias@%$host_alias%g
1755
1755
s%@host_cpu@%$host_cpu %g
1756
1756
s%@host_vendor@%$host_vendor %g
1757
1757
s%@host_os@%$host_os %g
1758
- s%@PORTNAME@%$PORTNAME %g
1759
- s%@ODBCINSTDIR@%$ODBCINSTDIR %g
1758
+ s%@ODBCINST@%$ODBCINST %g
1760
1759
s%@CC@%$CC %g
1761
1760
s%@CPP@%$CPP %g
1761
+ s%@PORTNAME@%$PORTNAME %g
1762
1762
s%@AROPT@%$AROPT %g
1763
1763
s%@SHARED_LIB@%$SHARED_LIB %g
1764
1764
s%@DLSUFFIX@%$DLSUFFIX %g
@@ -1977,6 +1977,51 @@ cat >> $CONFIG_STATUS <<\EOF
1977
1977
fi
1978
1978
fi; done
1979
1979
1980
+ EOF
1981
+
1982
+ cat >> $CONFIG_STATUS << EOF
1983
+ ac_sources="makefiles/Makefile.${os} "
1984
+ ac_dests="Makefile.port"
1985
+ EOF
1986
+
1987
+ cat >> $CONFIG_STATUS << \EOF
1988
+ srcdir=$ac_given_srcdir
1989
+ while test -n "$ac_sources "; do
1990
+ set $ac_dests ; ac_dest=$1 ; shift; ac_dests=$*
1991
+ set $ac_sources ; ac_source=$1 ; shift; ac_sources=$*
1992
+
1993
+ echo "linking $srcdir /$ac_source to $ac_dest "
1994
+
1995
+ if test ! -r $srcdir /$ac_source ; then
1996
+ { echo "configure: error: $srcdir /$ac_source : File not found" 1>&2; exit 1; }
1997
+ fi
1998
+ rm -f $ac_dest
1999
+
2000
+ # Make relative symlinks.
2001
+ # Remove last slash and all that follows it. Not all systems have dirname.
2002
+ ac_dest_dir=` echo $ac_dest | sed ' s%/[^/][^/]*$%%' `
2003
+ if test "$ac_dest_dir " != "$ac_dest " && test "$ac_dest_dir " != .; then
2004
+ # The dest file is in a subdirectory.
2005
+ test ! -d "$ac_dest_dir " && mkdir "$ac_dest_dir "
2006
+ ac_dest_dir_suffix="/` echo $ac_dest_dir | sed ' s%^\./%%' ` "
2007
+ # A "../" for each directory in $ac_dest_dir_suffix .
2008
+ ac_dots=` echo $ac_dest_dir_suffix | sed ' s%/[^/]*%../%g' `
2009
+ else
2010
+ ac_dest_dir_suffix= ac_dots=
2011
+ fi
2012
+
2013
+ case "$srcdir " in
2014
+ [/$]*) ac_rel_source="$srcdir /$ac_source " ;;
2015
+ *) ac_rel_source="$ac_dots$srcdir /$ac_source " ;;
2016
+ esac
2017
+
2018
+ # Make a symlink if possible; otherwise try a hard link.
2019
+ if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2020
+ ln $srcdir /$ac_source $ac_dest ; then :
2021
+ else
2022
+ { echo "configure: error: can not link $ac_dest to $srcdir /$ac_source " 1>&2; exit 1; }
2023
+ fi
2024
+ done
1980
2025
EOF
1981
2026
cat >> $CONFIG_STATUS << EOF
1982
2027
0 commit comments