IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 26, 2012, 11:47:13 AM (14 years ago)
Author:
eugene
Message:

changes to support pedantic gcc warnings; add configure option for debug-build and no-as-needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/m4/ipp_stdopts.m4

    r23793 r34089  
    11
     2dnl IPP_STDCFLAGS must go *after* external probes (to avoid Werror confusing things)
    23AC_DEFUN([IPP_STDCFLAGS],
    34[
     5    dnl this section currently overrides a user-defined CFLAGS
    46    AC_ARG_ENABLE(optimize,
    57      [AS_HELP_STRING(--enable-optimize,enable compiler optimization)],
     
    1214      ]
    1315    )
     16    dnl this section accepts a user-defined CFLAGS, and sets CFLAGS to the empty string if not present
     17    AC_ARG_ENABLE(debug-build,
     18      [AS_HELP_STRING(--enable-debug-build,enable debug build: ie disable Werror)],
     19      [AC_MSG_RESULT(debug build enabled)
     20        if test x"${CFLAGS}" == x; then
     21          CFLAGS="-Wall"
     22        else
     23          CFLAGS="${CFLAGS=} -Wall"
     24        fi
     25      ],
     26      [AC_MSG_RESULT([compile optimization disabled])
     27        if test x"${CFLAGS}" == x; then
     28          CFLAGS="-Wall -Werror"
     29        else
     30          CFLAGS="${CFLAGS=} -Wall -Werror"
     31        fi
     32      ]
     33    )
    1434])
     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)
     43        if test x"${LDFLAGS}" == x; then
     44          LDFLAGS="-Wl,--no-as-needed"
     45        else
     46          LDFLAGS="${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=""
     52        fi
     53      ]
     54    )
     55])
     56dnl
    1557
    1658AC_DEFUN([IPP_STDOPTS],
Note: See TracChangeset for help on using the changeset viewer.