Changeset f57cc9a


Ignore:
Timestamp:
Apr 3, 2013, 2:55:33 AM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Parents:
0a6a2d6 (diff), 13a39ae8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:
Merge 13a39ae85b50a361ce1f1c27746d66e2d1470649 into 0a6a2d6c705877b7c1cf418c94cebbe09ecbfdbc
Location:
m4
Files:
3 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • m4/ax_cflags_warn_all.m4

    r378ede7 re9b4a2c  
    2525#    - $3 action-if-found : add value to shellvariable
    2626#    - $4 action-if-not-found : nothing
     27#
     28#   NOTE: These macros depend on AX_APPEND_FLAG.
    2729#
    2830# LICENSE
     
    5759#   exception to the GPL to apply to your modified version as well.
    5860
    59 #serial 10
     61#serial 14
    6062
    61 AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
    62 AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
    63 AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all])dnl
     63AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl
     64AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl
     65AS_VAR_PUSHDEF([VAR],[ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl
    6466AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
    6567VAR,[VAR="no, unknown"
    66  AC_LANG_PUSH([C])
    67  ac_save_[]FLAGS="$[]FLAGS"
    68 for ac_arg dnl
    69 in "-pedantic  % -Wall"       dnl   GCC
    70    "-xstrconst % -v"          dnl Solaris C
    71    "-std1      % -verbose -w0 -warnprotos" dnl Digital Unix
    72    "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
    73    "-ansi -ansiE % -fullwarn" dnl IRIX
    74    "+ESlit     % +w1"         dnl HP-UX C
    75    "-Xc        % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
    76    "-h conform % -h msglevel 2" dnl Cray C (Unicos)
    77    #
    78 do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
    79    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
    80                      [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
    81 done
    82  FLAGS="$ac_save_[]FLAGS"
    83  AC_LANG_POP([C])
    84 ])
    85 case ".$VAR" in
    86      .ok|.ok,*) m4_ifvaln($3,$3) ;;
    87    .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
    88         AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
    89                       m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
    90    *) m4_ifvaln($3,$3,[
    91    if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
    92    then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
    93    else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
    94                       m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
    95    fi ]) ;;
    96 esac
    97 AS_VAR_POPDEF([VAR])dnl
    98 AS_VAR_POPDEF([FLAGS])dnl
    99 ])
    100 
    101 dnl the only difference - the LANG selection... and the default FLAGS
    102 
    103 AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
    104 AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
    105 AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_warn_all])dnl
    106 AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
    107 VAR,[VAR="no, unknown"
    108  AC_LANG_PUSH([C++])
    109  ac_save_[]FLAGS="$[]FLAGS"
    110 for ac_arg dnl
    111 in "-pedantic  % -Wall"       dnl   GCC
    112    "-xstrconst % -v"          dnl Solaris C
    113    "-std1      % -verbose -w0 -warnprotos" dnl Digital Unix
    114    "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
    115    "-ansi -ansiE % -fullwarn" dnl IRIX
    116    "+ESlit     % +w1"         dnl HP-UX C
    117    "-Xc        % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
    118    "-h conform % -h msglevel 2" dnl Cray C (Unicos)
    119    #
    120 do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
    121    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
    122                      [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
    123 done
    124  FLAGS="$ac_save_[]FLAGS"
    125  AC_LANG_POP([C++])
    126 ])
    127 case ".$VAR" in
    128      .ok|.ok,*) m4_ifvaln($3,$3) ;;
    129    .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
    130         AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
    131                       m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
    132    *) m4_ifvaln($3,$3,[
    133    if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
    134    then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
    135    else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
    136                       m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
    137    fi ]) ;;
    138 esac
    139 AS_VAR_POPDEF([VAR])dnl
    140 AS_VAR_POPDEF([FLAGS])dnl
    141 ])
    142 
    143 dnl the only difference - the LANG selection... and the default FLAGS
    144 
    145 AC_DEFUN([AX_FCFLAGS_WARN_ALL],[dnl
    146 AS_VAR_PUSHDEF([FLAGS],[FCFLAGS])dnl
    147 AS_VAR_PUSHDEF([VAR],[ax_cv_fcflags_warn_all])dnl
    148 AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
    149 VAR,[VAR="no, unknown"
    150  AC_LANG_PUSH([Fortran])
    151  ac_save_[]FLAGS="$[]FLAGS"
     68ac_save_[]FLAGS="$[]FLAGS"
    15269for ac_arg dnl
    15370in "-warn all  % -warn all"   dnl Intel
     
    16582                     [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
    16683done
    167  FLAGS="$ac_save_[]FLAGS"
    168  AC_LANG_POP([Fortran])
     84FLAGS="$ac_save_[]FLAGS"
    16985])
     86AS_VAR_POPDEF([FLAGS])dnl
     87AC_REQUIRE([AX_APPEND_FLAG])
    17088case ".$VAR" in
    17189     .ok|.ok,*) m4_ifvaln($3,$3) ;;
    172    .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
    173         AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
    174                       m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
    175    *) m4_ifvaln($3,$3,[
    176    if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
    177    then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
    178    else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
    179                       m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
    180    fi ]) ;;
     90   .|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;;
     91   *) m4_default($3,[AX_APPEND_FLAG([$VAR], [$1])]) ;;
    18192esac
    18293AS_VAR_POPDEF([VAR])dnl
    183 AS_VAR_POPDEF([FLAGS])dnl
    184 ])
    185 
     94])dnl AX_FLAGS_WARN_ALL
    18695dnl  implementation tactics:
    18796dnl   the for-argument contains a list of options. The first part of
     
    194103dnl   delimiter. A non-option comment can be given after "%%" marks
    195104dnl   which will be shown but not added to the respective C/CXXFLAGS.
     105
     106AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
     107AC_LANG_PUSH([C])
     108AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
     109AC_LANG_POP([C])
     110])
     111
     112AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
     113AC_LANG_PUSH([C++])
     114AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
     115AC_LANG_POP([C++])
     116])
     117
     118AC_DEFUN([AX_FCFLAGS_WARN_ALL],[dnl
     119AC_LANG_PUSH([Fortran])
     120AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
     121AC_LANG_POP([Fortran])
     122])
  • m4/pkg.m4

    r650fb2c r13a39ae8  
    158158fi[]dnl
    159159])# PKG_CHECK_MODULES
     160
     161
     162# PKG_INSTALLDIR(DIRECTORY)
     163# -------------------------
     164# Substitutes the variable pkgconfigdir as the location where a module
     165# should install pkg-config .pc files. By default the directory is
     166# $libdir/pkgconfig, but the default can be changed by passing
     167# DIRECTORY. The user can override through the --with-pkgconfigdir
     168# parameter.
     169AC_DEFUN([PKG_INSTALLDIR],
     170[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
     171m4_pushdef([pkg_description],
     172    [pkg-config installation directory @<:@]pkg_default[@:>@])
     173AC_ARG_WITH([pkgconfigdir],
     174    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
     175    [with_pkgconfigdir=]pkg_default)
     176AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
     177m4_popdef([pkg_default])
     178m4_popdef([pkg_description])
     179]) dnl PKG_INSTALLDIR
     180
     181
     182# PKG_NOARCH_INSTALLDIR(DIRECTORY)
     183# -------------------------
     184# Substitutes the variable noarch_pkgconfigdir as the location where a
     185# module should install arch-independent pkg-config .pc files. By
     186# default the directory is $datadir/pkgconfig, but the default can be
     187# changed by passing DIRECTORY. The user can override through the
     188# --with-noarch-pkgconfigdir parameter.
     189AC_DEFUN([PKG_NOARCH_INSTALLDIR],
     190[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
     191m4_pushdef([pkg_description],
     192    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
     193AC_ARG_WITH([noarch-pkgconfigdir],
     194    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
     195    [with_noarch_pkgconfigdir=]pkg_default)
     196AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
     197m4_popdef([pkg_default])
     198m4_popdef([pkg_description])
     199]) dnl PKG_NOARCH_INSTALLDIR
     200
     201
     202# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
     203# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
     204# -------------------------------------------
     205# Retrieves the value of the pkg-config variable for the given module.
     206AC_DEFUN([PKG_CHECK_VAR],
     207[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
     208AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
     209
     210_PKG_CONFIG([$1], [variable="][$3]["], [$2])
     211AS_VAR_COPY([$1], [pkg_cv_][$1])
     212
     213AS_VAR_IF([$1], [""], [$5], [$4])dnl
     214])# PKG_CHECK_VAR
Note: See TracChangeset for help on using the changeset viewer.