File 1376-Update-configure-scripts.patch of Package erlang

From 64ea409d2d4e25b353ed4a96a6c565d5cccf5000 Mon Sep 17 00:00:00 2001
From: Ingela Anderton Andin <ingela@erlang.org>
Date: Wed, 18 Mar 2026 12:18:05 +0100
Subject: [PATCH 6/7] Update configure scripts

---
 configure          |  2 ++
 lib/odbc/configure | 50 +++++++++++++++++++++++++++++++++++++---------
 2 files changed, 43 insertions(+), 9 deletions(-)

diff --git a/configure b/configure
index 250091f5dd..8bc1b47ae9 100755
--- a/configure
+++ b/configure
@@ -165,6 +165,8 @@ while test $# != 0; do
                            [ "$skip_app" = "erl_interface" ]; then
                         echo "ERROR: $skip_app is a mandatory application" 1>&2
                         exit 1
+		    elif [ "$skip_app" = "odbc" ]; then
+			echo "make of odbc c_src will be skipped due to user configure option --without-odbc" >> lib/$skip_app/CONF_INFO;
 		    elif test -d "lib/$skip_app"; then
 			skip_applications="$skip_applications $skip_app"
 		    fi;;
diff --git a/lib/odbc/configure b/lib/odbc/configure
index eda3416ec4..0548ec2d4e 100755
--- a/lib/odbc/configure
+++ b/lib/odbc/configure
@@ -641,6 +641,7 @@ ac_includes_default="\
 ac_header_c_list=
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+ODBC_CAN_BUILD_DRIVER
 ODBC_INCLUDE
 ODBC_LIB
 TARGET_FLAGS
@@ -6003,7 +6004,13 @@ fi
 
 
 # ODBC
-$RM -f "$ERL_TOP/lib/odbc/SKIP"
+if test -f ./CONF_INFO; then
+   rm ./CONF_INFO
+fi
+
+ODBC_CAN_BUILD_DRIVER=true
+
+
 
 
 
@@ -6861,9 +6868,15 @@ fi
   yes-yes | yes-) :
 
 			msg="Dont know where to search for odbc (setting erl_xcomp_sysroot will help)"
-			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $msg" >&5
+				echo "$msg" >> ./CONF_INFO
+    ODBC_CAN_BUILD_DRIVER=false
+    if test X"$with_odbc" = X"yes" ; then
+        as_fn_error $? "$msg" "$LINENO" 5
+    else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $msg" >&5
 printf "%s\n" "$as_me: WARNING: $msg" >&2;}
-			echo "$msg" > "$ERL_TOP/lib/odbc/SKIP"
+    fi
+
 			odbc_lib_link_success=wont_try
                      ;; #(
   no-yes | no-) :
@@ -6925,9 +6938,15 @@ printf %s "checking for odbc in standard locations... " >&6; }
 			if  test "x$is_odbc_std_location" != "xyes"; then
 			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
-			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No odbc library found skipping odbc" >&5
+			    	echo "No odbc library found skipping odbc" >> ./CONF_INFO
+    ODBC_CAN_BUILD_DRIVER=false
+    if test X"$with_odbc" = X"yes" ; then
+        as_fn_error $? "No odbc library found skipping odbc" "$LINENO" 5
+    else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No odbc library found skipping odbc" >&5
 printf "%s\n" "$as_me: WARNING: No odbc library found skipping odbc" >&2;}
-			    echo "No odbc library found" > "$ERL_TOP/lib/odbc/SKIP"
+    fi
+
 			else
 			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ODBC_LIB" >&5
 printf "%s\n" "$ODBC_LIB" >&6; }
@@ -7169,19 +7188,32 @@ done
 CFLAGS="$save_CFLAGS"
 
 if test $odbc_required_headers = no;  then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"ODBC library - header check failed\"" >&5
+    	echo ""ODBC library - header check failed"" >> ./CONF_INFO
+    ODBC_CAN_BUILD_DRIVER=false
+    if test X"$with_odbc" = X"yes" ; then
+        as_fn_error $? "\"ODBC library - header check failed\"" "$LINENO" 5
+    else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"ODBC library - header check failed\"" >&5
 printf "%s\n" "$as_me: WARNING: \"ODBC library - header check failed\"" >&2;}
-    echo "ODBC library - header check failed" > $ERL_TOP/lib/odbc/SKIP
+    fi
+
 fi
 if test $odbc_lib_link_success = no;  then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"ODBC library - link check failed\"" >&5
+    	echo ""ODBC library - link check failed"" >> ./CONF_INFO
+    ODBC_CAN_BUILD_DRIVER=false
+    if test X"$with_odbc" = X"yes" ; then
+        as_fn_error $? "\"ODBC library - link check failed\"" "$LINENO" 5
+    else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"ODBC library - link check failed\"" >&5
 printf "%s\n" "$as_me: WARNING: \"ODBC library - link check failed\"" >&2;}
-    echo "ODBC library - link check failed" > $ERL_TOP/lib/odbc/SKIP
+    fi
+
 fi
 
 
 
 
+
   ;;
 esac
 fi
-- 
2.51.0

openSUSE Build Service is sponsored by