Skip to content

Commit 96bc999

Browse files
committed
Update configure scripts
1 parent f4f2d1a commit 96bc999

File tree

3 files changed

+241
-23
lines changed

3 files changed

+241
-23
lines changed

erts/config.h.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* config.h.in. Generated from configure.ac by autoheader. */
2-
/* SPDX-License-Identifier: GPL-3.0-or-later WITH Autoconf-exception-generic-3.0 */
2+
33

44
#ifndef __ERTS_CONFIG_H__
55
#define __ERTS_CONFIG_H__

lib/erl_interface/config.h.in

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* config.h.in. Generated from configure.ac by autoheader. */
2-
/* SPDX-License-Identifier: GPL-3.0-or-later WITH Autoconf-exception-generic-3.0 */
32

43
/* Define to 1 if using 'alloca.c'. */
54
#undef C_ALLOCA

lib/odbc/configure

+240-21
Original file line numberDiff line numberDiff line change
@@ -4944,26 +4944,6 @@ then :
49444944

49454945
fi
49464946

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
49674947

49684948
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
49694949
printf %s "checking for an ANSI C-conforming const... " >&6; }
@@ -5639,6 +5619,8 @@ case $host_os in #(
56395619
ODBC_INCLUDE="-I$with_odbc/include"
56405620
fi
56415621

5622+
save_LIBS="$LIBS"
5623+
LIBS="$LIBS $ODBC_LIB"
56425624
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -liodbc" >&5
56435625
printf %s "checking for SQLAllocHandle in -liodbc... " >&6; }
56445626
if test ${ac_cv_lib_iodbc_SQLAllocHandle+y}
@@ -5683,17 +5665,70 @@ fi
56835665
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLAllocHandle" >&5
56845666
printf "%s\n" "$ac_cv_lib_iodbc_SQLAllocHandle" >&6; }
56855667
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
56865717
then :
56875718
ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes
56885719
fi
56895720

5721+
fi
5722+
LIBS="$save_LIBS"
56905723
;; #(
56915724
haiku*) :
56925725

56935726
TARGET_FLAGS="-DUNIX"
56945727
ODBC_LIB= -L"/system/lib"
56955728
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
56975732
printf %s "checking for SQLAllocHandle in -lodbc... " >&6; }
56985733
if test ${ac_cv_lib_odbc_SQLAllocHandle+y}
56995734
then :
@@ -5741,6 +5776,57 @@ then :
57415776
ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes
57425777
fi
57435778

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"
57445830
;; #(
57455831
win32|cygwin) :
57465832

@@ -5794,6 +5880,8 @@ fi
57945880
ODBC_LIB=-L"$with_odbc/lib"
57955881
ODBC_INCLUDE="-I$with_odbc/include"
57965882
fi
5883+
save_LIBS="$LIBS"
5884+
LIBS="$LIBS $ODBC_LIB"
57975885
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lodbc32" >&5
57985886
printf %s "checking for main in -lodbc32... " >&6; }
57995887
if test ${ac_cv_lib_odbc32_main+y}
@@ -5833,6 +5921,7 @@ then :
58335921
ODBC_LIB="$ODBC_LIB -lodbc32"; odbc_lib_link_success=yes
58345922
fi
58355923

5924+
LIBS="$save_LIBS"
58365925
;; #(
58375926
*) :
58385927

@@ -5911,6 +6000,8 @@ printf "%s\n" "$as_me: WARNING: No odbc library found skipping odbc" >&2;}
59116000
else
59126001
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ODBC_LIB" >&5
59136002
printf "%s\n" "$ODBC_LIB" >&6; }
6003+
save_LIBS="$LIBS"
6004+
LIBS="$LIBS $ODBC_LIB"
59146005
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
59156006
printf %s "checking for SQLAllocHandle in -lodbc... " >&6; }
59166007
if test ${ac_cv_lib_odbc_SQLAllocHandle+y}
@@ -5959,12 +6050,65 @@ then :
59596050
ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes
59606051
fi
59616052

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"
59626104
fi
59636105
;; #(
59646106
*) :
59656107

59666108
ODBC_LIB=-L"$with_odbc/lib"
59676109
ODBC_INCLUDE="-I$with_odbc/include"
6110+
save_LIBS="$LIBS"
6111+
LIBS="$LIBS $ODBC_LIB"
59686112
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SQLAllocHandle in -lodbc" >&5
59696113
printf %s "checking for SQLAllocHandle in -lodbc... " >&6; }
59706114
if test ${ac_cv_lib_odbc_SQLAllocHandle+y}
@@ -6013,11 +6157,86 @@ then :
60136157
ODBC_LIB="$ODBC_LIB -lodbc"; odbc_lib_link_success=yes
60146158
fi
60156159

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"
60166211
;;
60176212
esac
60186213
;;
60196214
esac
60206215

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+
60216240
if test $odbc_required_headers = no; then
60226241
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"ODBC library - header check failed\"" >&5
60236242
printf "%s\n" "$as_me: WARNING: \"ODBC library - header check failed\"" >&2;}

0 commit comments

Comments
 (0)