Ignore:
Timestamp:
Aug 2, 2010, 6:40:21 PM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba 3.5: vendor update to 3.5.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/configure.in

    r427 r478  
    209209AC_CHECK_TOOL(AR, ar)
    210210
    211 dnl Check if we use GNU ld
    212 LD=ld
     211dnl Check if we (actually our C compiler!) use GNU ld
    213212AC_PROG_LD_GNU
    214213
     
    217216dnl warnings when building modules.
    218217if test "$ac_cv_prog_gnu_ld" = "yes"; then
    219         ac_cv_gnu_ld_version=`$LD -v 2>/dev/null | head -1`
     218        ac_cv_gnu_ld_version=`$CC -Wl,-v /dev/null 2>/dev/null | head -1`
    220219        AC_MSG_CHECKING(GNU ld release date)
    221220        changequote(,)dnl
     
    263262AC_SUBST(BROKEN_CC)
    264263
    265 dnl Check if the C compiler understands -Werror
     264dnl Check if the C compiler understands -Werror (GNU)
    266265AC_CACHE_CHECK([that the C compiler understands -Werror],samba_cv_HAVE_Werror, [
    267266 AC_TRY_RUN_STRICT([
     
    285284   Werror_FLAGS="-w2"
    286285else
    287 dnl Check if the C compiler understands -errwarn
     286dnl Check if the C compiler understands -errwarn (Sun)
    288287AC_CACHE_CHECK([that the C compiler understands -errwarn],samba_cv_HAVE_errwarn, [
    289288  AC_TRY_RUN_STRICT([
     
    295294if test x"$samba_cv_HAVE_errwarn" = x"yes"; then
    296295   Werror_FLAGS="-errwarn=%all"
     296else
     297dnl Check if the C compiler understands -qhalt (IBM)
     298AC_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)])
     305if test x"$samba_cv_HAVE_qhalt" = x"yes"; then
     306   Werror_FLAGS="-qhalt=w"
     307fi
    297308fi
    298309fi
     
    14261437                cat > conftest.c <<EOF
    14271438int foo;
    1428 main () { return 0;}
     1439int main () { return 0;}
    14291440EOF
    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])
    14311442                then
    14321443                        samba_cv_fpie=yes
     
    15111522                *solaris*) AC_DEFINE(SUNOS5,1,[Whether the host os is solaris])
    15121523                        BLDSHARED="true"
    1513                         LDSHFLAGS="-G"
    1514                         SONAMEFLAG="-h "
    15151524                        if test "${GCC}" = "yes"; then
    15161525                                PICFLAG="-fPIC"
     
    15191528                                        DYNEXP="-Wl,-E"
    15201529                                fi
     1530                                LDSHFLAGS="-shared"
    15211531                        else
    15221532                                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,"
    15261539                        fi
    15271540                        AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
     
    15591572                        esac
    15601573                        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,"
    15641576                        if test "${GCC}" = "yes"; then
    15651577                                PICFLAG="-fPIC"
     
    15801592                        if test "${GCC}" != "yes"; then
    15811593                                ## 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"
    15831595                        fi
    15841596
     
    16941706AC_MSG_RESULT($BLDSHARED)
    16951707
     1708saved_before_as_needed_ldflags="$LDFLAGS"
    16961709for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
    16971710        saved_ldflags="$LDFLAGS"
     
    17071720done
    17081721
     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
     1728if 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
     1737fi
     1738
     1739
     1740
    17091741# for historical reasons almost all linkers don't complain about unresolved
    17101742# symbols in shared libs. Except for the internal samba modules we want to get
     
    17591791   # The $SHLD and $LDSHFLAGS variables may contain references to other
    17601792   # 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
    17651800   rm -f "shlib.$SHLIBEXT" shlib.o
    17661801
Note: See TracChangeset for help on using the changeset viewer.