@@ -4944,26 +4944,6 @@ then :
4944
4944
4945
4945
fi
4946
4946
4947
- for ac_header in sql.h sqlext.h
4948
- do :
4949
- as_ac_Header=` printf " %s\n" " ac_cv_header_$ac_header " | sed " $as_sed_sh " `
4950
- ac_fn_c_check_header_compile " $LINENO " " $ac_header " " $as_ac_Header " " #ifdef HAVE_WINDOWS_H
4951
- # include <windows.h>
4952
- #endif
4953
-
4954
- "
4955
- if eval test \" x\$ " $as_ac_Header " \" = x" yes"
4956
- then :
4957
- cat >> confdefs.h << _ACEOF
4958
- #define ` printf " %s\n" " HAVE_$ac_header " | sed " $as_sed_cpp " ` 1
4959
- _ACEOF
4960
- odbc_required_headers=yes
4961
- else case e in # (
4962
- e) odbc_required_headers=no ;;
4963
- esac
4964
- fi
4965
-
4966
- done
4967
4947
4968
4948
{ printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for an ANSI C-conforming const" >&5
4969
4949
printf %s " checking for an ANSI C-conforming const... " >&6 ; }
@@ -5639,6 +5619,8 @@ case $host_os in #(
5639
5619
ODBC_INCLUDE=" -I$with_odbc /include"
5640
5620
fi
5641
5621
5622
+ save_LIBS=" $LIBS "
5623
+ LIBS=" $LIBS $ODBC_LIB "
5642
5624
{ printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for SQLAllocHandle in -liodbc" >&5
5643
5625
printf %s " checking for SQLAllocHandle in -liodbc... " >&6 ; }
5644
5626
if test ${ac_cv_lib_iodbc_SQLAllocHandle+y}
@@ -5683,17 +5665,70 @@ fi
5683
5665
{ printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: $ac_cv_lib_iodbc_SQLAllocHandle " >&5
5684
5666
printf " %s\n" " $ac_cv_lib_iodbc_SQLAllocHandle " >&6 ; }
5685
5667
if test " x$ac_cv_lib_iodbc_SQLAllocHandle " = xyes
5668
+ then :
5669
+ ODBC_LIB=" $ODBC_LIB -liodbc" ; odbc_lib_link_success=yes
5670
+ fi
5671
+
5672
+ if test $odbc_lib_link_success = no; then
5673
+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for SQLAllocHandle in -lodbc" >&5
5674
+ printf %s " checking for SQLAllocHandle in -lodbc... " >&6 ; }
5675
+ if test ${ac_cv_lib_odbc_SQLAllocHandle+y}
5676
+ then :
5677
+ printf %s " (cached) " >&6
5678
+ else case e in # (
5679
+ e) ac_check_lib_save_LIBS=$LIBS
5680
+ LIBS=" -lodbc $LIBS "
5681
+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
5682
+ /* end confdefs.h. */
5683
+
5684
+ /* Override any GCC internal prototype to avoid an error.
5685
+ Use char because int might match the return type of a GCC
5686
+ builtin and then its argument prototype would still apply.
5687
+ The 'extern "C"' is for builds by C++ compilers;
5688
+ although this is not generally supported in C code supporting it here
5689
+ has little cost and some practical benefit (sr 110532). */
5690
+ #ifdef __cplusplus
5691
+ extern "C"
5692
+ #endif
5693
+ char SQLAllocHandle (void);
5694
+ int
5695
+ main (void)
5696
+ {
5697
+ return SQLAllocHandle ();
5698
+ ;
5699
+ return 0;
5700
+ }
5701
+ _ACEOF
5702
+ if ac_fn_c_try_link " $LINENO "
5703
+ then :
5704
+ ac_cv_lib_odbc_SQLAllocHandle=yes
5705
+ else case e in # (
5706
+ e) ac_cv_lib_odbc_SQLAllocHandle=no ;;
5707
+ esac
5708
+ fi
5709
+ rm -f core conftest.err conftest.$ac_objext conftest.beam \
5710
+ conftest$ac_exeext conftest.$ac_ext
5711
+ LIBS=$ac_check_lib_save_LIBS ;;
5712
+ esac
5713
+ fi
5714
+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: $ac_cv_lib_odbc_SQLAllocHandle " >&5
5715
+ printf " %s\n" " $ac_cv_lib_odbc_SQLAllocHandle " >&6 ; }
5716
+ if test " x$ac_cv_lib_odbc_SQLAllocHandle " = xyes
5686
5717
then :
5687
5718
ODBC_LIB=" $ODBC_LIB -lodbc" ; odbc_lib_link_success=yes
5688
5719
fi
5689
5720
5721
+ fi
5722
+ LIBS=" $save_LIBS "
5690
5723
;; # (
5691
5724
haiku* ) :
5692
5725
5693
5726
TARGET_FLAGS=" -DUNIX"
5694
5727
ODBC_LIB= -L" /system/lib"
5695
5728
ODBC_INCLUDE=" -I/system/develop/headers"
5696
- { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for SQLAllocHandle in -lodbc" >&5
5729
+ save_LIBS=" $LIBS "
5730
+ LIBS=" $LIBS $ODBC_LIB "
5731
+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for SQLAllocHandle in -lodbc" >&5
5697
5732
printf %s " checking for SQLAllocHandle in -lodbc... " >&6 ; }
5698
5733
if test ${ac_cv_lib_odbc_SQLAllocHandle+y}
5699
5734
then :
@@ -5741,6 +5776,57 @@ then :
5741
5776
ODBC_LIB=" $ODBC_LIB -lodbc" ; odbc_lib_link_success=yes
5742
5777
fi
5743
5778
5779
+ if test $odbc_lib_link_success = no; then
5780
+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for SQLAllocHandle in -liodbc" >&5
5781
+ printf %s " checking for SQLAllocHandle in -liodbc... " >&6 ; }
5782
+ if test ${ac_cv_lib_iodbc_SQLAllocHandle+y}
5783
+ then :
5784
+ printf %s " (cached) " >&6
5785
+ else case e in # (
5786
+ e) ac_check_lib_save_LIBS=$LIBS
5787
+ LIBS=" -liodbc $LIBS "
5788
+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
5789
+ /* end confdefs.h. */
5790
+
5791
+ /* Override any GCC internal prototype to avoid an error.
5792
+ Use char because int might match the return type of a GCC
5793
+ builtin and then its argument prototype would still apply.
5794
+ The 'extern "C"' is for builds by C++ compilers;
5795
+ although this is not generally supported in C code supporting it here
5796
+ has little cost and some practical benefit (sr 110532). */
5797
+ #ifdef __cplusplus
5798
+ extern "C"
5799
+ #endif
5800
+ char SQLAllocHandle (void);
5801
+ int
5802
+ main (void)
5803
+ {
5804
+ return SQLAllocHandle ();
5805
+ ;
5806
+ return 0;
5807
+ }
5808
+ _ACEOF
5809
+ if ac_fn_c_try_link " $LINENO "
5810
+ then :
5811
+ ac_cv_lib_iodbc_SQLAllocHandle=yes
5812
+ else case e in # (
5813
+ e) ac_cv_lib_iodbc_SQLAllocHandle=no ;;
5814
+ esac
5815
+ fi
5816
+ rm -f core conftest.err conftest.$ac_objext conftest.beam \
5817
+ conftest$ac_exeext conftest.$ac_ext
5818
+ LIBS=$ac_check_lib_save_LIBS ;;
5819
+ esac
5820
+ fi
5821
+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: $ac_cv_lib_iodbc_SQLAllocHandle " >&5
5822
+ printf " %s\n" " $ac_cv_lib_iodbc_SQLAllocHandle " >&6 ; }
5823
+ if test " x$ac_cv_lib_iodbc_SQLAllocHandle " = xyes
5824
+ then :
5825
+ ODBC_LIB=" $ODBC_LIB -liodbc" ; odbc_lib_link_success=yes
5826
+ fi
5827
+
5828
+ fi
5829
+ LIBS=" $save_LIBS "
5744
5830
;; # (
5745
5831
win32|cygwin) :
5746
5832
5794
5880
ODBC_LIB=-L" $with_odbc /lib"
5795
5881
ODBC_INCLUDE=" -I$with_odbc /include"
5796
5882
fi
5883
+ save_LIBS=" $LIBS "
5884
+ LIBS=" $LIBS $ODBC_LIB "
5797
5885
{ printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for main in -lodbc32" >&5
5798
5886
printf %s " checking for main in -lodbc32... " >&6 ; }
5799
5887
if test ${ac_cv_lib_odbc32_main+y}
@@ -5833,6 +5921,7 @@ then :
5833
5921
ODBC_LIB=" $ODBC_LIB -lodbc32" ; odbc_lib_link_success=yes
5834
5922
fi
5835
5923
5924
+ LIBS=" $save_LIBS "
5836
5925
;; # (
5837
5926
* ) :
5838
5927
@@ -5911,6 +6000,8 @@ printf "%s\n" "$as_me: WARNING: No odbc library found skipping odbc" >&2;}
5911
6000
else
5912
6001
{ printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: $ODBC_LIB " >&5
5913
6002
printf " %s\n" " $ODBC_LIB " >&6 ; }
6003
+ save_LIBS=" $LIBS "
6004
+ LIBS=" $LIBS $ODBC_LIB "
5914
6005
{ printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for SQLAllocHandle in -lodbc" >&5
5915
6006
printf %s " checking for SQLAllocHandle in -lodbc... " >&6 ; }
5916
6007
if test ${ac_cv_lib_odbc_SQLAllocHandle+y}
@@ -5959,12 +6050,65 @@ then :
5959
6050
ODBC_LIB=" $ODBC_LIB -lodbc" ; odbc_lib_link_success=yes
5960
6051
fi
5961
6052
6053
+ if test $odbc_lib_link_success = no; then
6054
+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for SQLAllocHandle in -liodbc" >&5
6055
+ printf %s " checking for SQLAllocHandle in -liodbc... " >&6 ; }
6056
+ if test ${ac_cv_lib_iodbc_SQLAllocHandle+y}
6057
+ then :
6058
+ printf %s " (cached) " >&6
6059
+ else case e in # (
6060
+ e) ac_check_lib_save_LIBS=$LIBS
6061
+ LIBS=" -liodbc $LIBS "
6062
+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
6063
+ /* end confdefs.h. */
6064
+
6065
+ /* Override any GCC internal prototype to avoid an error.
6066
+ Use char because int might match the return type of a GCC
6067
+ builtin and then its argument prototype would still apply.
6068
+ The 'extern "C"' is for builds by C++ compilers;
6069
+ although this is not generally supported in C code supporting it here
6070
+ has little cost and some practical benefit (sr 110532). */
6071
+ #ifdef __cplusplus
6072
+ extern "C"
6073
+ #endif
6074
+ char SQLAllocHandle (void);
6075
+ int
6076
+ main (void)
6077
+ {
6078
+ return SQLAllocHandle ();
6079
+ ;
6080
+ return 0;
6081
+ }
6082
+ _ACEOF
6083
+ if ac_fn_c_try_link " $LINENO "
6084
+ then :
6085
+ ac_cv_lib_iodbc_SQLAllocHandle=yes
6086
+ else case e in # (
6087
+ e) ac_cv_lib_iodbc_SQLAllocHandle=no ;;
6088
+ esac
6089
+ fi
6090
+ rm -f core conftest.err conftest.$ac_objext conftest.beam \
6091
+ conftest$ac_exeext conftest.$ac_ext
6092
+ LIBS=$ac_check_lib_save_LIBS ;;
6093
+ esac
6094
+ fi
6095
+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: $ac_cv_lib_iodbc_SQLAllocHandle " >&5
6096
+ printf " %s\n" " $ac_cv_lib_iodbc_SQLAllocHandle " >&6 ; }
6097
+ if test " x$ac_cv_lib_iodbc_SQLAllocHandle " = xyes
6098
+ then :
6099
+ ODBC_LIB=" $ODBC_LIB -liodbc" ; odbc_lib_link_success=yes
6100
+ fi
6101
+
6102
+ fi
6103
+ LIBS=" $save_LIBS "
5962
6104
fi
5963
6105
;; # (
5964
6106
* ) :
5965
6107
5966
6108
ODBC_LIB=-L" $with_odbc /lib"
5967
6109
ODBC_INCLUDE=" -I$with_odbc /include"
6110
+ save_LIBS=" $LIBS "
6111
+ LIBS=" $LIBS $ODBC_LIB "
5968
6112
{ printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for SQLAllocHandle in -lodbc" >&5
5969
6113
printf %s " checking for SQLAllocHandle in -lodbc... " >&6 ; }
5970
6114
if test ${ac_cv_lib_odbc_SQLAllocHandle+y}
@@ -6013,11 +6157,86 @@ then :
6013
6157
ODBC_LIB=" $ODBC_LIB -lodbc" ; odbc_lib_link_success=yes
6014
6158
fi
6015
6159
6160
+ if test $odbc_lib_link_success = no; then
6161
+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking for SQLAllocHandle in -liodbc" >&5
6162
+ printf %s " checking for SQLAllocHandle in -liodbc... " >&6 ; }
6163
+ if test ${ac_cv_lib_iodbc_SQLAllocHandle+y}
6164
+ then :
6165
+ printf %s " (cached) " >&6
6166
+ else case e in # (
6167
+ e) ac_check_lib_save_LIBS=$LIBS
6168
+ LIBS=" -liodbc $LIBS "
6169
+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
6170
+ /* end confdefs.h. */
6171
+
6172
+ /* Override any GCC internal prototype to avoid an error.
6173
+ Use char because int might match the return type of a GCC
6174
+ builtin and then its argument prototype would still apply.
6175
+ The 'extern "C"' is for builds by C++ compilers;
6176
+ although this is not generally supported in C code supporting it here
6177
+ has little cost and some practical benefit (sr 110532). */
6178
+ #ifdef __cplusplus
6179
+ extern "C"
6180
+ #endif
6181
+ char SQLAllocHandle (void);
6182
+ int
6183
+ main (void)
6184
+ {
6185
+ return SQLAllocHandle ();
6186
+ ;
6187
+ return 0;
6188
+ }
6189
+ _ACEOF
6190
+ if ac_fn_c_try_link " $LINENO "
6191
+ then :
6192
+ ac_cv_lib_iodbc_SQLAllocHandle=yes
6193
+ else case e in # (
6194
+ e) ac_cv_lib_iodbc_SQLAllocHandle=no ;;
6195
+ esac
6196
+ fi
6197
+ rm -f core conftest.err conftest.$ac_objext conftest.beam \
6198
+ conftest$ac_exeext conftest.$ac_ext
6199
+ LIBS=$ac_check_lib_save_LIBS ;;
6200
+ esac
6201
+ fi
6202
+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: $ac_cv_lib_iodbc_SQLAllocHandle " >&5
6203
+ printf " %s\n" " $ac_cv_lib_iodbc_SQLAllocHandle " >&6 ; }
6204
+ if test " x$ac_cv_lib_iodbc_SQLAllocHandle " = xyes
6205
+ then :
6206
+ ODBC_LIB=" $ODBC_LIB -liodbc" ; odbc_lib_link_success=yes
6207
+ fi
6208
+
6209
+ fi
6210
+ LIBS=" $save_LIBS "
6016
6211
;;
6017
6212
esac
6018
6213
;;
6019
6214
esac
6020
6215
6216
+ save_CFLAGS=" $CFLAGS "
6217
+ CFLAGS=" $CFLAGS $ODBC_INCLUDE "
6218
+ for ac_header in sql.h sqlext.h
6219
+ do :
6220
+ as_ac_Header=` printf " %s\n" " ac_cv_header_$ac_header " | sed " $as_sed_sh " `
6221
+ ac_fn_c_check_header_compile " $LINENO " " $ac_header " " $as_ac_Header " " #ifdef HAVE_WINDOWS_H
6222
+ # include <windows.h>
6223
+ #endif
6224
+
6225
+ "
6226
+ if eval test \" x\$ " $as_ac_Header " \" = x" yes"
6227
+ then :
6228
+ cat >> confdefs.h << _ACEOF
6229
+ #define ` printf " %s\n" " HAVE_$ac_header " | sed " $as_sed_cpp " ` 1
6230
+ _ACEOF
6231
+ odbc_required_headers=yes
6232
+ else case e in # (
6233
+ e) odbc_required_headers=no ;;
6234
+ esac
6235
+ fi
6236
+
6237
+ done
6238
+ CFLAGS=" $save_CFLAGS "
6239
+
6021
6240
if test $odbc_required_headers = no; then
6022
6241
{ printf " %s\n" " $as_me :${as_lineno-$LINENO } : WARNING: \" ODBC library - header check failed\" " >&5
6023
6242
printf " %s\n" " $as_me : WARNING: \" ODBC library - header check failed\" " >&2 ; }
0 commit comments