File: debian_configure

package info (click to toggle)
cctools 9.9-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 44,624 kB
  • sloc: ansic: 192,539; python: 20,827; cpp: 20,199; sh: 11,719; perl: 4,106; xml: 3,688; makefile: 1,224
file content (88 lines) | stat: -rw-r--r-- 2,935 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
From: Michael Hanke <mih@debian.org>
Subject: Configure Debian build and runtime environment

Modifications include:

* Always build for LINUX, even on non-Linux Debian platforms (e.g. kFreeBSD).
  The test for Linux seems to be more of a test for the GNU libc and all target
  platform in Debian have that.
* Prefer to link against shared libraries.
* Accept externally provided CFLAGS
* Path tweaks for Debian-specific install locations.
* Deal with the difference between netstat APIs on Linux and kFreeBSD
* Set BUILD_* for reproducible builds

--- a/configure
+++ b/configure
@@ -41,13 +41,21 @@
 # Here's what we want to exec literally:
 #   uname -a | sed s/#/\\#/ | sed s/\$/$$/
 # The above sed commands are to escape the output for the Makefile.
-system_information=`uname -a | sed 's/#/\\\\#/' | sed 's/\\$/$$/'`
+# Avoid capture of system info
+# system_information=`uname -a | sed 's/#/\\\\#/' | sed 's/\\$/$$/'`
+system_information="Debian build of cctools"
+
+#BUILD_CPU="$(uname -m | tr \[a-z\] \[A-Z\])"
+BUILD_DATE="2018-12-25"
+# BUILD_HOST="$(uname -n)"
+BUILD_HOST="debian"
+#BUILD_SYS="$(uname -s | tr \[a-z\] \[A-Z\] | awk -F_ '{print $1}')"
+BUILD_USER="debian"
+# this setting is actually used to identify GNU libc platforms
+# and Debian is all GNU libc, so force "Linux" even on non-Linux systems
+BUILD_SYS=LINUX
+BUILD_CPU="$(dpkg-architecture -qDEB_BUILD_ARCH | tr \[a-z-\] \[A-Z_\])"
 
-BUILD_CPU="$(uname -m | tr \[a-z\] \[A-Z\])"
-BUILD_DATE="$NOW"
-BUILD_HOST="$(uname -n)"
-BUILD_SYS="$(uname -s | tr \[a-z\] \[A-Z\] | awk -F_ '{print $1}')"
-BUILD_USER="$USER"
 
 if [ "$BUILD_CPU" = UNKNOWN ]
 then
@@ -436,7 +444,8 @@
 then
 		if [ "${config_static_libgcc}" = yes ]
 		then
-				ldflags="${ldflags} -Xlinker -Bstatic -static-libgcc"
+				ldflags="${ldflags} ${link_as_needed}"
+
 		fi
 		
 		ldflags="${ldflags} -Xlinker -Bdynamic ${link_as_needed}"
@@ -448,6 +457,9 @@
 		fi
 fi
 
+# accept ldflags from outside
+ldflags="$ldflags $LDFLAGS"
+
 if [ "$optsanitize" = 1 ]; then
 	ccflags="${ccflags} -fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined"
 	ldflags="-fsanitize=address -lasan -lubsan ${ldflags}"
@@ -457,12 +469,12 @@
 ##########################################################################
 # SWITCH TO STATIC LINKING FOR UNCOMMON THIRD-PARTY PACKAGES
 ##########################################################################
-library_search_mode=prefer_static
+library_search_mode=prefer_dynamic
 ##########################################################################
 
 if [ "$globus_flavor" = auto ]
 then
-	if [ $BUILD_CPU = X86_64 ]
+	if [ $BUILD_CPU = X86_64 -o $BUILD_CPU = AMD64 ]
 	then
 		globus_flavor=gcc64
 	else
@@ -587,7 +599,7 @@
 then
 	mysql_avail=yes
 	mysql_path=${mysql_path:-${base_root}}
-	if library_search mysqlclient ${mysql_path} mysql
+	if library_search mysqlclient ${mysql_path}
 	then
 		mysql_ldflags="${library_search_result}"