From 148f67e061b0df841e3691196a2706a1942d4ab0 Mon Sep 17 00:00:00 2001 From: Brian West Date: Wed, 19 Mar 2014 04:04:38 -0500 Subject: [PATCH] FS-6375 adding LTCFLAGS makes configure choose the proper pre post deps on both 32bit and 64bit just work out of the box --- configure.ac | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index ed650e1bb1..14adc481d3 100644 --- a/configure.ac +++ b/configure.ac @@ -299,9 +299,15 @@ elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then case "$host" in *darwin12.*|*darwin11.*|*darwin10.*|*darwin9.*|*darwin8.*) APR_ADDTO(CFLAGS, -arch x86_64) - APR_ADDTO(LDFLAGS, -arch x86_64) - APR_ADDTO(CXXFLAGS, -arch x86_64) + APR_ADDTO(LDFLAGS, -arch x86_64) + APR_ADDTO(CXXFLAGS, -arch x86_64) ;; + *-solaris2*) + APR_ADDTO(CFLAGS, -m64) + APR_ADDTO(LTCFLAGS, -m64) + APR_ADDTO(LDFLAGS, -m64) + APR_ADDTO(CXXFLAGS, -m64) + ;; *) LIBS="$LIBS -m64" ;; @@ -565,6 +571,19 @@ case "$host" in APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl]) ;; *-solaris2*) + if test "${enable_64}" = "yes"; then + APR_ADDTO(CFLAGS, [-I/opt/64/include]) + APR_ADDTO(LTCFLAGS, [-I/opt/64/include]) + APR_ADDTO(CXXFLAGS, [-I/opt/64/include]) + APR_ADDTO(LDFLAGS, [-L/opt/64/lib -Wl,-rpath,/opt/64/lib]) + else + APR_ADDTO(CFLAGS, [-I/opt/include]) + APR_ADDTO(LTCFLAGS, [-I/opt/include]) + APR_ADDTO(CXXFLAGS, -I/opt/include) + APR_ADDTO(LDFLAGS, [-L/opt/lib -Wl,-rpath,/opt/lib]) + APR_ADDTO(SWITCH_AM_CFLAGS, [-I/opt/include]) + APR_ADDTO(SWITCH_AM_LDFLAGS, [-L/opt/lib -Wl,-rpath,/opt/lib]) + fi APR_ADDTO(SWITCH_AM_CFLAGS, -DPATH_MAX=2048 -D__EXTENSIONS__) APR_ADDTO(SWITCH_AM_LDFLAGS, -lsendfile -lresolv -lsocket -lnsl -luuid) APR_ADDTO(ESL_LDFLAGS, -lnsl -lsocket)