IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 26, 2012, 9:57:00 AM (14 years ago)
Author:
eugene
Message:

configure.ac changes: invoke LDFLAGS *before* probes, invoke CFLAGS *after* probes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120601/psLib/m4/ipp_stdopts.m4

    r34003 r34076  
    11
    2     dnl this is currently written to override an user-defined LDFLAGS, is that OK?
    3 
     2dnl IPP_STDCFLAGS must go *after* external probes (to avoid Werror confusing things)
    43AC_DEFUN([IPP_STDCFLAGS],
    54[
     
    1514      ]
    1615    )
     16    dnl this section accepts a user-defined CFLAGS, and sets CFLAGS to the empty string if not present
    1717    AC_ARG_ENABLE(debug-build,
    1818      [AS_HELP_STRING(--enable-debug-build,enable debug build: ie disable Werror)],
     
    3232      ]
    3333    )
    34     AC_ARG_ENABLE(no-as-needed, [AS_HELP_STRING(--enable-no-as-needed, prevent as-needed option sometimes supplied to gcc such as Ubuntu after 11.11)],
    35       [AC_MSG_RESULT(compile optimization enabled)
     34])
     35
     36dnl IPP_STDLDFLAGS must go *before* external probes (so linking is done with --no-as-needed if needed)
     37AC_DEFUN([IPP_STDLDFLAGS],
     38[
     39    dnl this section accepts a user-defined LDFLAGS, and sets LDFLAGS to the empty string if not present
     40    AC_ARG_ENABLE(no-as-needed,
     41      [AS_HELP_STRING(--enable-no-as-needed, prevent as-needed option sometimes supplied to gcc such as Ubuntu after 11.11)],
     42      [AC_MSG_RESULT(no-as-needed passed to linker)
    3643        if test x"${LDFLAGS}" == x; then
     44          LDFLAGS="-Wl,--no-as-needed"
     45        else
    3746          LDFLAGS="${LDFLAGS=} -Wl,--no-as-needed"
    38         else
    39           LDFLAGS="-Wl,--no-as-needed"
     47        fi
     48      ],
     49      [AC_MSG_RESULT(as-needed linker flags accepted)
     50        if test x"${LDFLAGS}" == x; then
     51          LDFLAGS=""
    4052        fi
    4153      ]
Note: See TracChangeset for help on using the changeset viewer.