~ubuntu-branches/ubuntu/quantal/enigmail/quantal-security

« back to all changes in this revision

Viewing changes to mozilla/build/autoconf/expandlibs.m4

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2013-09-13 16:02:15 UTC
  • mfrom: (0.12.16)
  • Revision ID: package-import@ubuntu.com-20130913160215-u3g8nmwa0pdwagwc
Tags: 2:1.5.2-0ubuntu0.12.10.1
* New upstream release v1.5.2 for Thunderbird 24

* Build enigmail using a stripped down Thunderbird 17 build system, as it's
  now quite difficult to build the way we were doing previously, with the
  latest Firefox build system
* Add debian/patches/no_libxpcom.patch - Don't link against libxpcom, as it
  doesn't exist anymore (but exists in the build system)
* Add debian/patches/use_sdk.patch - Use the SDK version of xpt.py and
  friends
* Drop debian/patches/ipc-pipe_rename.diff (not needed anymore)
* Drop debian/patches/makefile_depth.diff (not needed anymore)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl This Source Code Form is subject to the terms of the Mozilla Public
 
2
dnl License, v. 2.0. If a copy of the MPL was not distributed with this
 
3
dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
4
 
 
5
AC_DEFUN([MOZ_EXPAND_LIBS],
 
6
[
 
7
dnl ========================================================
 
8
dnl =
 
9
dnl = Check what kind of list files are supported by the
 
10
dnl = linker
 
11
dnl =
 
12
dnl ========================================================
 
13
 
 
14
AC_CACHE_CHECK(what kind of list files are supported by the linker,
 
15
    EXPAND_LIBS_LIST_STYLE,
 
16
    [echo "int main() {return 0;}" > conftest.${ac_ext}
 
17
     if AC_TRY_COMMAND(${CC-cc} -o conftest.${OBJ_SUFFIX} -c $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5) && test -s conftest.${OBJ_SUFFIX}; then
 
18
         echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list
 
19
         if AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
 
20
             EXPAND_LIBS_LIST_STYLE=linkerscript
 
21
         else
 
22
             echo "conftest.${OBJ_SUFFIX}" > conftest.list
 
23
             if AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
 
24
                 EXPAND_LIBS_LIST_STYLE=list
 
25
             else
 
26
                 EXPAND_LIBS_LIST_STYLE=none
 
27
             fi
 
28
         fi
 
29
     else
 
30
         dnl We really don't expect to get here, but just in case
 
31
         AC_ERROR([couldn't compile a simple C file])
 
32
     fi
 
33
     rm -rf conftest*])
 
34
 
 
35
LIBS_DESC_SUFFIX=desc
 
36
AC_SUBST(LIBS_DESC_SUFFIX)
 
37
AC_SUBST(EXPAND_LIBS_LIST_STYLE)
 
38
 
 
39
if test "$GCC_USE_GNU_LD"; then
 
40
    AC_CACHE_CHECK(what kind of ordering can be done with the linker,
 
41
        EXPAND_LIBS_ORDER_STYLE,
 
42
        [> conftest.order
 
43
         _SAVE_LDFLAGS="$LDFLAGS"
 
44
         LDFLAGS="${LDFLAGS} -Wl,--section-ordering-file,conftest.order"
 
45
         AC_TRY_LINK([], [],
 
46
             EXPAND_LIBS_ORDER_STYLE=section-ordering-file,
 
47
             EXPAND_LIBS_ORDER_STYLE=)
 
48
         LDFLAGS="$_SAVE_LDFLAGS"
 
49
         if test -z "$EXPAND_LIBS_ORDER_STYLE"; then
 
50
             if AC_TRY_COMMAND(${CC-cc} ${DSO_LDOPTS} ${LDFLAGS} -o ${DLL_PREFIX}conftest${DLL_SUFFIX} -Wl,--verbose 2> /dev/null | sed -n '/^===/,/^===/p' | grep '\.text'); then
 
51
                 EXPAND_LIBS_ORDER_STYLE=linkerscript
 
52
             else
 
53
                 EXPAND_LIBS_ORDER_STYLE=none
 
54
             fi
 
55
             rm -f ${DLL_PREFIX}conftest${DLL_SUFFIX}
 
56
         fi])
 
57
fi
 
58
AC_SUBST(EXPAND_LIBS_ORDER_STYLE)
 
59
 
 
60
])