Changeset f57cc9a
- Timestamp:
- Apr 3, 2013, 2:55:33 AM (12 years ago)
- 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. - Location:
- m4
- Files:
-
- 3 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
m4/ax_cflags_warn_all.m4
r378ede7 re9b4a2c 25 25 # - $3 action-if-found : add value to shellvariable 26 26 # - $4 action-if-not-found : nothing 27 # 28 # NOTE: These macros depend on AX_APPEND_FLAG. 27 29 # 28 30 # LICENSE … … 57 59 # exception to the GPL to apply to your modified version as well. 58 60 59 #serial 1 061 #serial 14 60 62 61 AC_DEFUN([AX_ CFLAGS_WARN_ALL],[dnl62 AS_VAR_PUSHDEF([FLAGS],[ CFLAGS])dnl63 AS_VAR_PUSHDEF([VAR],[ac_cv_ cflags_warn_all])dnl63 AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl 64 AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl 65 AS_VAR_PUSHDEF([VAR],[ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl 64 66 AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings], 65 67 VAR,[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" 68 ac_save_[]FLAGS="$[]FLAGS" 152 69 for ac_arg dnl 153 70 in "-warn all % -warn all" dnl Intel … … 165 82 [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) 166 83 done 167 FLAGS="$ac_save_[]FLAGS" 168 AC_LANG_POP([Fortran]) 84 FLAGS="$ac_save_[]FLAGS" 169 85 ]) 86 AS_VAR_POPDEF([FLAGS])dnl 87 AC_REQUIRE([AX_APPEND_FLAG]) 170 88 case ".$VAR" in 171 89 .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])]) ;; 181 92 esac 182 93 AS_VAR_POPDEF([VAR])dnl 183 AS_VAR_POPDEF([FLAGS])dnl 184 ]) 185 94 ])dnl AX_FLAGS_WARN_ALL 186 95 dnl implementation tactics: 187 96 dnl the for-argument contains a list of options. The first part of … … 194 103 dnl delimiter. A non-option comment can be given after "%%" marks 195 104 dnl which will be shown but not added to the respective C/CXXFLAGS. 105 106 AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl 107 AC_LANG_PUSH([C]) 108 AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) 109 AC_LANG_POP([C]) 110 ]) 111 112 AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl 113 AC_LANG_PUSH([C++]) 114 AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) 115 AC_LANG_POP([C++]) 116 ]) 117 118 AC_DEFUN([AX_FCFLAGS_WARN_ALL],[dnl 119 AC_LANG_PUSH([Fortran]) 120 AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) 121 AC_LANG_POP([Fortran]) 122 ]) -
m4/pkg.m4
r650fb2c r13a39ae8 158 158 fi[]dnl 159 159 ])# 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. 169 AC_DEFUN([PKG_INSTALLDIR], 170 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 171 m4_pushdef([pkg_description], 172 [pkg-config installation directory @<:@]pkg_default[@:>@]) 173 AC_ARG_WITH([pkgconfigdir], 174 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 175 [with_pkgconfigdir=]pkg_default) 176 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 177 m4_popdef([pkg_default]) 178 m4_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. 189 AC_DEFUN([PKG_NOARCH_INSTALLDIR], 190 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 191 m4_pushdef([pkg_description], 192 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 193 AC_ARG_WITH([noarch-pkgconfigdir], 194 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 195 [with_noarch_pkgconfigdir=]pkg_default) 196 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 197 m4_popdef([pkg_default]) 198 m4_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. 206 AC_DEFUN([PKG_CHECK_VAR], 207 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 208 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 209 210 _PKG_CONFIG([$1], [variable="][$3]["], [$2]) 211 AS_VAR_COPY([$1], [pkg_cv_][$1]) 212 213 AS_VAR_IF([$1], [""], [$5], [$4])dnl 214 ])# PKG_CHECK_VAR
Note: See TracChangeset
for help on using the changeset viewer.