Changeset 478 for vendor/current/source3/configure.in
- Timestamp:
- Aug 2, 2010, 6:40:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/configure.in
r427 r478 209 209 AC_CHECK_TOOL(AR, ar) 210 210 211 dnl Check if we use GNU ld 212 LD=ld 211 dnl Check if we (actually our C compiler!) use GNU ld 213 212 AC_PROG_LD_GNU 214 213 … … 217 216 dnl warnings when building modules. 218 217 if test "$ac_cv_prog_gnu_ld" = "yes"; then 219 ac_cv_gnu_ld_version=`$ LD -v2>/dev/null | head -1`218 ac_cv_gnu_ld_version=`$CC -Wl,-v /dev/null 2>/dev/null | head -1` 220 219 AC_MSG_CHECKING(GNU ld release date) 221 220 changequote(,)dnl … … 263 262 AC_SUBST(BROKEN_CC) 264 263 265 dnl Check if the C compiler understands -Werror 264 dnl Check if the C compiler understands -Werror (GNU) 266 265 AC_CACHE_CHECK([that the C compiler understands -Werror],samba_cv_HAVE_Werror, [ 267 266 AC_TRY_RUN_STRICT([ … … 285 284 Werror_FLAGS="-w2" 286 285 else 287 dnl Check if the C compiler understands -errwarn 286 dnl Check if the C compiler understands -errwarn (Sun) 288 287 AC_CACHE_CHECK([that the C compiler understands -errwarn],samba_cv_HAVE_errwarn, [ 289 288 AC_TRY_RUN_STRICT([ … … 295 294 if test x"$samba_cv_HAVE_errwarn" = x"yes"; then 296 295 Werror_FLAGS="-errwarn=%all" 296 else 297 dnl Check if the C compiler understands -qhalt (IBM) 298 AC_CACHE_CHECK([that the C compiler understands -qhalt],samba_cv_HAVE_qhalt, [ 299 AC_TRY_RUN_STRICT([ 300 int main(void) 301 { 302 return 0; 303 }],[$CFLAGS -qhalt=w],[$CPPFLAGS],[$LDFLAGS], 304 samba_cv_HAVE_qhalt=yes,samba_cv_HAVE_qhalt=no,samba_cv_HAVE_qhalt=cross)]) 305 if test x"$samba_cv_HAVE_qhalt" = x"yes"; then 306 Werror_FLAGS="-qhalt=w" 307 fi 297 308 fi 298 309 fi … … 1426 1437 cat > conftest.c <<EOF 1427 1438 int foo; 1428 main () { return 0;}1439 int main () { return 0;} 1429 1440 EOF 1430 if AC_TRY_COMMAND ([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fPIE -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])1441 if AC_TRY_COMMAND_NO_STDERR([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -pie -fPIE -o conftest conftest.c]) 1431 1442 then 1432 1443 samba_cv_fpie=yes … … 1511 1522 *solaris*) AC_DEFINE(SUNOS5,1,[Whether the host os is solaris]) 1512 1523 BLDSHARED="true" 1513 LDSHFLAGS="-G"1514 SONAMEFLAG="-h "1515 1524 if test "${GCC}" = "yes"; then 1516 1525 PICFLAG="-fPIC" … … 1519 1528 DYNEXP="-Wl,-E" 1520 1529 fi 1530 LDSHFLAGS="-shared" 1521 1531 else 1522 1532 PICFLAG="-KPIC" 1523 ## ${CFLAGS} added for building 64-bit shared 1524 ## libs using Sun's Compiler 1525 LDSHFLAGS="-G \${CFLAGS}" 1533 LDSHFLAGS="-G" 1534 fi 1535 if test "$ac_cv_prog_gnu_ld" = "yes"; then 1536 SONAMEFLAG="-Wl,-soname=" 1537 else 1538 SONAMEFLAG="-Wl,-h," 1526 1539 fi 1527 1540 AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block]) … … 1559 1572 esac 1560 1573 BLDSHARED="true" 1561 LDSHFLAGS="-set_version sgi1.0 -shared" 1562 SONAMEFLAG="-soname " 1563 SHLD="\${LD}" 1574 LDSHFLAGS="-Wl,-set_version,sgi1.0 -shared" 1575 SONAMEFLAG="-Wl,-soname," 1564 1576 if test "${GCC}" = "yes"; then 1565 1577 PICFLAG="-fPIC" … … 1580 1592 if test "${GCC}" != "yes"; then 1581 1593 ## for funky AIX compiler using strncpy() 1582 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000 "1594 CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000 -qhalt=e" 1583 1595 fi 1584 1596 … … 1694 1706 AC_MSG_RESULT($BLDSHARED) 1695 1707 1708 saved_before_as_needed_ldflags="$LDFLAGS" 1696 1709 for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do 1697 1710 saved_ldflags="$LDFLAGS" … … 1707 1720 done 1708 1721 1722 # check if we have to disable LD_AS_NEEDED_FLAG: 1723 # On some systems for a veriety of reasons linking with 1724 # -Wl,--as-needed -lreadline -lncurses fails 1725 # we have to retest, if these combination is detected before. 1726 # Bugzilla #7209 1727 1728 if test x$ac_cv_lib_readline_rl_callback_handler_install = xyes ; then 1729 if test x$ld_as_needed_flag_found = xyes ; then 1730 AC_MSG_CHECKING([if $LD_AS_NEEDED_FLAG works with readline]) 1731 # try if check no fails 1732 save_LIBS=$LIBS 1733 LIBS="$LIBS $TERMLIBS" 1734 AC_TRY_LINK([], [rl_callback_handler_install();], [AC_MSG_RESULT([yes])],[ AC_MSG_RESULT([no]); LDFLAGS="$saved_before_as_needed_ldflags"]) 1735 LIBS="$save_LIBS" 1736 fi 1737 fi 1738 1739 1740 1709 1741 # for historical reasons almost all linkers don't complain about unresolved 1710 1742 # symbols in shared libs. Except for the internal samba modules we want to get … … 1759 1791 # The $SHLD and $LDSHFLAGS variables may contain references to other 1760 1792 # variables so they need to be eval'ed. 1761 $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o \ 1762 shlib.o ${srcdir-.}/../tests/shlib.c && \ 1763 `eval echo $SHLD` `eval echo $LDSHFLAGS` -o "shlib.$SHLIBEXT" \ 1764 shlib.o && ac_cv_shlib_works=yes 1793 if AC_TRY_COMMAND([$CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.o ${srcdir-.}/../tests/shlib.c 1>&AS_MESSAGE_LOG_FD]) 1794 then 1795 if AC_TRY_COMMAND([`eval echo "$SHLD $LDSHFLAGS $PICFLAG"` -o "shlib.$SHLIBEXT" shlib.o 1>&AS_MESSAGE_LOG_FD]) 1796 then 1797 ac_cv_shlib_works=yes 1798 fi 1799 fi 1765 1800 rm -f "shlib.$SHLIBEXT" shlib.o 1766 1801
Note:
See TracChangeset
for help on using the changeset viewer.