File: debian_configure

package info (click to toggle)
cctools 1%3A7.14.5-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 36,956 kB
  • sloc: ansic: 114,614; python: 29,532; cpp: 20,313; sh: 13,675; perl: 4,056; xml: 3,688; makefile: 1,436
file content (90 lines) | stat: -rw-r--r-- 3,173 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
89
90
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

Index: cctools-7.13.1/configure
===================================================================
--- cctools-7.13.1.orig/configure
+++ cctools-7.13.1/configure
@@ -42,13 +42,21 @@ configure_arguments=`echo "$*" | sed 's/
 # 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
@@ -429,7 +437,8 @@ if [ $BUILD_SYS = LINUX ]
 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}"
@@ -446,6 +455,9 @@ then
 		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}"
@@ -455,12 +467,12 @@ fi
 ##########################################################################
 # 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
@@ -585,7 +597,7 @@ if [ $config_mysql_path != no ]
 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}"