Merge lp:~trond-norbye/gearmand/configure into lp:gearmand/1.0

Proposed by Trond Norbye
Status: Merged
Merged at revision: not available
Proposed branch: lp:~trond-norbye/gearmand/configure
Merge into: lp:gearmand/1.0
Diff against target: None lines
To merge this branch: bzr merge lp:~trond-norbye/gearmand/configure
Reviewer Review Type Date Requested Status
Gearman-developers Pending
Review via email: mp+7405@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Trond Norbye (trond-norbye) wrote :

Allow a user to build a 32 bit version of Gearman on a 64-bit Solaris system. This is needed so that a build server can provide the packages for a 32 and 64 bit installation of Gearman (in addition there is nothing more annoying than if you want to build a program that requires a certain shared lib, and it is not provided in the memory model that your application use...)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure.ac'
--- configure.ac 2009-06-11 19:27:28 +0000
+++ configure.ac 2009-06-13 08:54:34 +0000
@@ -94,30 +94,15 @@
94 CFLAGS="-ggdb3 -std=gnu99 ${CFLAGS}"94 CFLAGS="-ggdb3 -std=gnu99 ${CFLAGS}"
95 DEBUG_CFLAGS="-O0"95 DEBUG_CFLAGS="-O0"
96 OPTMIIZE_CFLAGS="-O3"96 OPTMIIZE_CFLAGS="-O3"
97fi97elif test "x$SUNCC" = "xyes"
98if test "$SUNCC" = "yes"
99then98then
100 isainfo_k=`isainfo -k`99 CFLAGS="-mt -xc99=all -Xa -xstrconst $CFLAGS"
101 if test "$target_cpu" = "sparc"100 CXXFLAGS="-mt -xlang=c99 $CXXFLAGS"
102 then101 DEBUG_CFLAGS="-g"
103 MEMALIGN_FLAGS="-xmemalign=8s"102 OPTIMIZE_CFLAGS="-xO4 -xdepend"
104 IS_64="-m64"
105 LDFLAGS="${LDFLAGS} -L/usr/lib/${isainfo_k} -L/usr/local/lib/${isainfo_k}"
106 else
107 if test "$isainfo_k" = "amd64"
108 then
109 IS_64="-m64"
110 LDFLAGS="${LDFLAGS} -L/usr/lib/${isainfo_k} -L/usr/local/lib/${isainfo_k}"
111 fi
112 fi
113 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
114
115 CFLAGS="-g -mt -xc99=all ${IS_64} ${MEMALIGN_FLAGS} ${CFLAGS}"
116 CXXFLAGS="-g -xlang=c99 ${IS_64} ${CXXFLAGS}"
117 DEBUG_CFLAGS="-xO0"
118 OPTIMIZE_CFLAGS="-xO4 -xlibmil -xdepend -Xa -mt -xstrconst"
119fi103fi
120104
105sinclude(m4/64bit.m4)
121106
122AC_HEADER_TIME107AC_HEADER_TIME
123AC_CHECK_HEADERS(assert.h errno.h fcntl.h getopt.h netinet/tcp.h pwd.h signal.h)108AC_CHECK_HEADERS(assert.h errno.h fcntl.h getopt.h netinet/tcp.h pwd.h signal.h)
@@ -259,7 +244,7 @@
259 CFLAGS="${DEBUG_CFLAGS} -DDEBUG ${CFLAGS}"244 CFLAGS="${DEBUG_CFLAGS} -DDEBUG ${CFLAGS}"
260else245else
261 # Optimized version. No debug246 # Optimized version. No debug
262 CFLAGS="${OPTIMIZE_CFLAGS} ${CFLAGS}"247 CFLAGS="${OPTIMIZE_CFLAGS} -DNDEBUG ${CFLAGS}"
263fi248fi
264249
265250
@@ -410,7 +395,7 @@
410echo " * Host CPU: $host_cpu"395echo " * Host CPU: $host_cpu"
411echo " * C Compiler: $CC_VERSION"396echo " * C Compiler: $CC_VERSION"
412echo " * Assertions enabled: $ac_cv_assert"397echo " * Assertions enabled: $ac_cv_assert"
413echo " * Debug enabled: $ac_enable_debug"398echo " * Debug enabled: $with_debug"
414echo " * Warnings as failure: $ac_warn_fail"399echo " * Warnings as failure: $ac_warn_fail"
415echo ""400echo ""
416echo "---"401echo "---"
417402
=== added file 'm4/64bit.m4'
--- m4/64bit.m4 1970-01-01 00:00:00 +0000
+++ m4/64bit.m4 2009-06-13 08:54:34 +0000
@@ -0,0 +1,31 @@
1dnl ---------------------------------------------------------------------------
2dnl Macro: 64BIT
3dnl ---------------------------------------------------------------------------
4AC_CHECK_PROGS(ISAINFO, [isainfo], [no])
5if test "x$ISAINFO" != "xno"
6then
7 isainfo_b=`isainfo -b`
8 spro_common_flags="-mt"
9 if test "x$isainfo_b" = "x64"
10 then
11 AC_ARG_ENABLE([64bit],
12 [AS_HELP_STRING([--disable-64bit],
13 [Build 64 bit binary @<:@default=on@:>@])],
14 [ac_enable_64bit="$enableval"],
15 [ac_enable_64bit="yes"])
16
17 if test "x$ac_enable_64bit" = "xyes"
18 then
19 CFLAGS="-m64 $CFLAGS"
20 CXXFLAGS="-m64 $CXXFLAGS"
21 if test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes"
22 then
23 CFLAGS="-xmemalign=8s $CFLAGS"
24 CXXFLAGS="-xmemalign=8s $CXXFLAGS"
25 fi
26 fi
27 fi
28fi
29dnl ---------------------------------------------------------------------------
30dnl End Macro: 64BIT
31dnl ---------------------------------------------------------------------------
032
=== modified file 'm4/lib-prefix.m4'
--- m4/lib-prefix.m4 2009-01-29 20:00:56 +0000
+++ m4/lib-prefix.m4 2009-06-13 08:54:34 +0000
@@ -183,13 +183,18 @@
183 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."183 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
184 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the184 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
185 dnl symlink is missing, so we set acl_libdirstem2 too.185 dnl symlink is missing, so we set acl_libdirstem2 too.
186 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],186 AC_MSG_CHECKING([if buildling 64-bit app])
187 [AC_EGREP_CPP([sixtyfour bits], [187 AC_RUN_IFELSE([
188#ifdef _LP64188 AC_LANG_PROGRAM([
189sixtyfour bits189 ], [
190#endif190 return sizeof(void*) == 8 ? 0 : 1;
191 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])191 ])
192 ])192 ], [
193 gl_cv_solaris_64bit=yes
194 ], [
195 gl_cv_solaris_64bit=no
196 ])
197 AC_MSG_RESULT([$gl_cv_solaris_64bit])
193 if test $gl_cv_solaris_64bit = yes; then198 if test $gl_cv_solaris_64bit = yes; then
194 acl_libdirstem=lib/64199 acl_libdirstem=lib/64
195 case "$host_cpu" in200 case "$host_cpu" in

Subscribers

People subscribed via source and target branches