| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | AC_DEFUN([PAC_PROG_MAKE_PROGRAM],[true |
|---|
| 21 | if test "X$MAKE" = "X" ; then |
|---|
| 22 | AC_CHECK_PROGS(MAKE,make gnumake nmake pmake smake) |
|---|
| 23 | fi |
|---|
| 24 | ]) |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | AC_DEFUN([PAC_PROG_MAKE_ECHOS_DIR],[ |
|---|
| 44 | if test "$MAKE_MAY_PRINT_DIR" != "yes" ; then |
|---|
| 45 | AC_CACHE_CHECK([whether make echos directory changes], |
|---|
| 46 | pac_cv_prog_make_echos_dir, |
|---|
| 47 | [ |
|---|
| 48 | AC_REQUIRE([PAC_PROG_MAKE_PROGRAM]) |
|---|
| 49 | |
|---|
| 50 | rm -rf conftest.dSYM |
|---|
| 51 | rm -f conftest |
|---|
| 52 | cat > conftest <<. |
|---|
| 53 | SHELL=/bin/sh |
|---|
| 54 | ALL: |
|---|
| 55 | @(dir="`pwd`" ; cd .. ; \$(MAKE) -f "\$\$dir/conftest" SUB) |
|---|
| 56 | SUB: |
|---|
| 57 | @echo "success" |
|---|
| 58 | . |
|---|
| 59 | str="`$MAKE -f conftest 2>&1`" |
|---|
| 60 | if test "$str" != "success" ; then |
|---|
| 61 | str="`$MAKE --no-print-directory -f conftest 2>&1`" |
|---|
| 62 | if test "$str" = "success" ; then |
|---|
| 63 | pac_cv_prog_make_echos_dir="yes using --no-print-directory" |
|---|
| 64 | else |
|---|
| 65 | pac_cv_prog_make_echos_dir="no" |
|---|
| 66 | echo "Unexpected output from make with program" >>config.log |
|---|
| 67 | cat conftest >>config.log |
|---|
| 68 | echo "str" >> config.log |
|---|
| 69 | fi |
|---|
| 70 | else |
|---|
| 71 | pac_cv_prog_make_echos_dir="no" |
|---|
| 72 | fi |
|---|
| 73 | |
|---|
| 74 | rm -rf conftest.dSYM |
|---|
| 75 | rm -f conftest |
|---|
| 76 | str="" |
|---|
| 77 | ]) |
|---|
| 78 | if test "$pac_cv_prog_make_echos_dir" = "yes using --no-print-directory" ; then |
|---|
| 79 | MAKE="$MAKE --no-print-directory" |
|---|
| 80 | fi |
|---|
| 81 | fi |
|---|
| 82 | ]) |
|---|
| 83 | |
|---|
| 84 | |
|---|
| 85 | |
|---|
| 86 | |
|---|
| 87 | |
|---|
| 88 | |
|---|
| 89 | |
|---|
| 90 | |
|---|
| 91 | |
|---|
| 92 | |
|---|
| 93 | |
|---|
| 94 | |
|---|
| 95 | |
|---|
| 96 | |
|---|
| 97 | |
|---|
| 98 | |
|---|
| 99 | |
|---|
| 100 | |
|---|
| 101 | |
|---|
| 102 | |
|---|
| 103 | AC_DEFUN([PAC_PROG_MAKE_INCLUDE],[ |
|---|
| 104 | AC_CACHE_CHECK([whether make supports include],pac_cv_prog_make_include,[ |
|---|
| 105 | AC_REQUIRE([PAC_PROG_MAKE_PROGRAM]) |
|---|
| 106 | |
|---|
| 107 | rm -rf conftest.dSYM |
|---|
| 108 | rm -f conftest |
|---|
| 109 | cat > conftest <<. |
|---|
| 110 | ALL: |
|---|
| 111 | @echo "success" |
|---|
| 112 | . |
|---|
| 113 | cat > conftest1 <<. |
|---|
| 114 | include conftest |
|---|
| 115 | . |
|---|
| 116 | pac_str=`$MAKE -f conftest1 2>&1` |
|---|
| 117 | |
|---|
| 118 | rm -rf conftest.dSYM |
|---|
| 119 | rm -f conftest conftest1 |
|---|
| 120 | if test "$pac_str" != "success" ; then |
|---|
| 121 | pac_cv_prog_make_include="no" |
|---|
| 122 | else |
|---|
| 123 | pac_cv_prog_make_include="yes" |
|---|
| 124 | fi |
|---|
| 125 | ]) |
|---|
| 126 | if test "$pac_cv_prog_make_include" = "no" ; then |
|---|
| 127 | ifelse([$2],,:,[$2]) |
|---|
| 128 | else |
|---|
| 129 | ifelse([$1],,:,[$1]) |
|---|
| 130 | fi |
|---|
| 131 | ]) |
|---|
| 132 | |
|---|
| 133 | |
|---|
| 134 | |
|---|
| 135 | |
|---|
| 136 | |
|---|
| 137 | |
|---|
| 138 | |
|---|
| 139 | |
|---|
| 140 | |
|---|
| 141 | |
|---|
| 142 | |
|---|
| 143 | |
|---|
| 144 | |
|---|
| 145 | |
|---|
| 146 | |
|---|
| 147 | |
|---|
| 148 | |
|---|
| 149 | |
|---|
| 150 | |
|---|
| 151 | AC_DEFUN([PAC_PROG_MAKE_ALLOWS_COMMENTS],[ |
|---|
| 152 | AC_CACHE_CHECK([whether make allows comments in actions], |
|---|
| 153 | pac_cv_prog_make_allows_comments,[ |
|---|
| 154 | AC_REQUIRE([PAC_PROG_MAKE_PROGRAM]) |
|---|
| 155 | |
|---|
| 156 | rm -rf conftest.dSYM |
|---|
| 157 | rm -f conftest |
|---|
| 158 | cat > conftest <<. |
|---|
| 159 | SHELL=/bin/sh |
|---|
| 160 | ALL: |
|---|
| 161 | @ |
|---|
| 162 | @echo "success" |
|---|
| 163 | . |
|---|
| 164 | pac_str=`$MAKE -f conftest 2>&1` |
|---|
| 165 | |
|---|
| 166 | rm -rf conftest.dSYM |
|---|
| 167 | rm -f conftest |
|---|
| 168 | if test "$pac_str" != "success" ; then |
|---|
| 169 | pac_cv_prog_make_allows_comments="no" |
|---|
| 170 | else |
|---|
| 171 | pac_cv_prog_make_allows_comments="yes" |
|---|
| 172 | fi |
|---|
| 173 | ]) |
|---|
| 174 | if test "$pac_cv_prog_make_allows_comments" = "no" ; then |
|---|
| 175 | AC_MSG_WARN([Your make does not allow comments in target code. |
|---|
| 176 | Using this make may cause problems when building programs. |
|---|
| 177 | You should consider using gnumake instead.]) |
|---|
| 178 | ifelse([$1],,[$1]) |
|---|
| 179 | fi |
|---|
| 180 | ]) |
|---|
| 181 | |
|---|
| 182 | |
|---|
| 183 | |
|---|
| 184 | |
|---|
| 185 | |
|---|
| 186 | |
|---|
| 187 | |
|---|
| 188 | |
|---|
| 189 | |
|---|
| 190 | |
|---|
| 191 | |
|---|
| 192 | |
|---|
| 193 | |
|---|
| 194 | |
|---|
| 195 | |
|---|
| 196 | |
|---|
| 197 | |
|---|
| 198 | |
|---|
| 199 | |
|---|
| 200 | |
|---|
| 201 | |
|---|
| 202 | |
|---|
| 203 | |
|---|
| 204 | |
|---|
| 205 | |
|---|
| 206 | |
|---|
| 207 | |
|---|
| 208 | |
|---|
| 209 | AC_DEFUN([PAC_PROG_MAKE_VPATH],[ |
|---|
| 210 | AC_SUBST(VPATH)AM_IGNORE(VPATH) |
|---|
| 211 | AC_CACHE_CHECK([for virtual path format], |
|---|
| 212 | pac_cv_prog_make_vpath,[ |
|---|
| 213 | AC_REQUIRE([PAC_PROG_MAKE_PROGRAM]) |
|---|
| 214 | |
|---|
| 215 | rm -rf conftest.dSYM |
|---|
| 216 | rm -rf conftest* |
|---|
| 217 | mkdir conftestdir |
|---|
| 218 | cat >conftestdir/a.c <<EOF |
|---|
| 219 | A sample file |
|---|
| 220 | EOF |
|---|
| 221 | cat > conftest <<EOF |
|---|
| 222 | all: a.o |
|---|
| 223 | VPATH=.:conftestdir |
|---|
| 224 | .c.o: |
|---|
| 225 | @echo \$< |
|---|
| 226 | EOF |
|---|
| 227 | ac_out=`$MAKE -f conftest 2>&1 | grep 'conftestdir/a.c'` |
|---|
| 228 | if test -n "$ac_out" ; then |
|---|
| 229 | pac_cv_prog_make_vpath="VPATH" |
|---|
| 230 | else |
|---|
| 231 | rm -f conftest |
|---|
| 232 | cat > conftest <<EOF |
|---|
| 233 | all: a.o |
|---|
| 234 | .PATH: . conftestdir |
|---|
| 235 | .c.o: |
|---|
| 236 | @echo \$< |
|---|
| 237 | EOF |
|---|
| 238 | ac_out=`$MAKE -f conftest 2>&1 | grep 'conftestdir/a.c'` |
|---|
| 239 | if test -n "$ac_out" ; then |
|---|
| 240 | pac_cv_prog_make_vpath=".PATH" |
|---|
| 241 | else |
|---|
| 242 | pac_cv_prog_make_vpath="neither VPATH nor .PATH works" |
|---|
| 243 | fi |
|---|
| 244 | fi |
|---|
| 245 | |
|---|
| 246 | rm -rf conftest.dSYM |
|---|
| 247 | rm -rf conftest* |
|---|
| 248 | ]) |
|---|
| 249 | if test "$pac_cv_prog_make_vpath" = "VPATH" ; then |
|---|
| 250 | VPATH='VPATH=.:${srcdir}' |
|---|
| 251 | elif test "$pac_cv_prog_make_vpath" = ".PATH" ; then |
|---|
| 252 | VPATH='.PATH: . ${srcdir}' |
|---|
| 253 | fi |
|---|
| 254 | ]) |
|---|
| 255 | |
|---|
| 256 | |
|---|
| 257 | |
|---|
| 258 | |
|---|
| 259 | |
|---|
| 260 | |
|---|
| 261 | |
|---|
| 262 | |
|---|
| 263 | |
|---|
| 264 | |
|---|
| 265 | |
|---|
| 266 | |
|---|
| 267 | |
|---|
| 268 | |
|---|
| 269 | |
|---|
| 270 | |
|---|
| 271 | |
|---|
| 272 | |
|---|
| 273 | AC_DEFUN([PAC_PROG_MAKE_SET_CFLAGS],[ |
|---|
| 274 | AC_CACHE_CHECK([whether make sets CFLAGS], |
|---|
| 275 | pac_cv_prog_make_set_cflags,[ |
|---|
| 276 | AC_REQUIRE([PAC_PROG_MAKE_PROGRAM]) |
|---|
| 277 | |
|---|
| 278 | rm -rf conftest.dSYM |
|---|
| 279 | rm -f conftest |
|---|
| 280 | cat > conftest <<EOF |
|---|
| 281 | SHELL=/bin/sh |
|---|
| 282 | ALL: |
|---|
| 283 | @echo X[\$]{CFLAGS}X |
|---|
| 284 | EOF |
|---|
| 285 | pac_str=`$MAKE -f conftest 2>&1` |
|---|
| 286 | |
|---|
| 287 | rm -rf conftest.dSYM |
|---|
| 288 | rm -f conftest |
|---|
| 289 | if test "$pac_str" = "XX" ; then |
|---|
| 290 | pac_cv_prog_make_set_cflags="no" |
|---|
| 291 | else |
|---|
| 292 | pac_cv_prog_make_set_cflags="yes" |
|---|
| 293 | fi |
|---|
| 294 | ]) |
|---|
| 295 | if test "$pac_cv_prog_make_set_cflags" = "no" ; then |
|---|
| 296 | ifelse([$2],,:,[$2]) |
|---|
| 297 | else |
|---|
| 298 | ifelse([$1],,:,[$1]) |
|---|
| 299 | fi |
|---|
| 300 | ]) |
|---|
| 301 | |
|---|
| 302 | |
|---|
| 303 | |
|---|
| 304 | |
|---|
| 305 | |
|---|
| 306 | |
|---|
| 307 | |
|---|
| 308 | AC_DEFUN([PAC_PROG_MAKE_CLOCK_SKEW],[ |
|---|
| 309 | AC_CACHE_CHECK([whether clock skew breaks make], |
|---|
| 310 | pac_cv_prog_make_found_clock_skew,[ |
|---|
| 311 | AC_REQUIRE([PAC_PROG_MAKE_PROGRAM]) |
|---|
| 312 | |
|---|
| 313 | rm -rf conftest.dSYM |
|---|
| 314 | rm -f conftest* |
|---|
| 315 | cat > conftest <<EOF |
|---|
| 316 | ALL: |
|---|
| 317 | @-echo "success" |
|---|
| 318 | EOF |
|---|
| 319 | $MAKE -f conftest > conftest.out 2>&1 |
|---|
| 320 | if grep -i skew conftest >/dev/null 2>&1 ; then |
|---|
| 321 | pac_cv_prog_make_found_clock_skew=yes |
|---|
| 322 | else |
|---|
| 323 | pac_cv_prog_make_found_clock_skew=no |
|---|
| 324 | fi |
|---|
| 325 | |
|---|
| 326 | rm -rf conftest.dSYM |
|---|
| 327 | rm -f conftest* |
|---|
| 328 | ]) |
|---|
| 329 | |
|---|
| 330 | |
|---|
| 331 | if test "$pac_cv_prog_make_found_clock_skew" = "yes" ; then |
|---|
| 332 | AC_MSG_WARN([Clock skew found by make. The configure and build may fail. |
|---|
| 333 | Consider building in a local instead of NFS filesystem.]) |
|---|
| 334 | fi |
|---|
| 335 | ]) |
|---|
| 336 | |
|---|
| 337 | |
|---|
| 338 | |
|---|
| 339 | |
|---|
| 340 | |
|---|
| 341 | |
|---|
| 342 | |
|---|
| 343 | |
|---|
| 344 | |
|---|
| 345 | |
|---|
| 346 | |
|---|
| 347 | |
|---|
| 348 | |
|---|
| 349 | |
|---|
| 350 | |
|---|
| 351 | |
|---|
| 352 | |
|---|
| 353 | |
|---|
| 354 | |
|---|
| 355 | |
|---|
| 356 | |
|---|
| 357 | AC_DEFUN([PAC_PROG_MAKE_HAS_PATTERN_RULES],[ |
|---|
| 358 | AC_CACHE_CHECK([whether make has pattern rules], |
|---|
| 359 | pac_cv_prog_make_has_patterns,[ |
|---|
| 360 | AC_REQUIRE([PAC_PROG_MAKE_PROGRAM]) |
|---|
| 361 | |
|---|
| 362 | rm -rf conftest.dSYM |
|---|
| 363 | rm -f conftest* |
|---|
| 364 | cat > conftestmm <<EOF |
|---|
| 365 | |
|---|
| 366 | .SUFFIXES: |
|---|
| 367 | .SUFFIXES: .dep .c |
|---|
| 368 | conftest%.dep: %.c |
|---|
| 369 | @cat \[$]< >\[$]@ |
|---|
| 370 | EOF |
|---|
| 371 | date > conftest.c |
|---|
| 372 | if ${MAKE} -f conftestmm conftestconftest.dep 1>&AC_FD_CC 2>&1 </dev/null ; then |
|---|
| 373 | pac_cv_prog_make_has_patterns="yes" |
|---|
| 374 | else |
|---|
| 375 | pac_cv_prog_make_has_patterns="no" |
|---|
| 376 | fi |
|---|
| 377 | |
|---|
| 378 | rm -rf conftest.dSYM |
|---|
| 379 | rm -f conftest* |
|---|
| 380 | ]) |
|---|
| 381 | if test "$pac_cv_prog_make_has_patterns" = "no" ; then |
|---|
| 382 | ifelse([$2],,:,[$2]) |
|---|
| 383 | else |
|---|
| 384 | ifelse([$1],,:,[$1]) |
|---|
| 385 | fi |
|---|
| 386 | ]) |
|---|
| 387 | |
|---|
| 388 | |
|---|
| 389 | |
|---|
| 390 | |
|---|
| 391 | |
|---|
| 392 | |
|---|
| 393 | |
|---|
| 394 | |
|---|
| 395 | |
|---|
| 396 | |
|---|
| 397 | |
|---|
| 398 | |
|---|
| 399 | |
|---|
| 400 | |
|---|
| 401 | |
|---|
| 402 | |
|---|
| 403 | |
|---|
| 404 | |
|---|
| 405 | |
|---|
| 406 | |
|---|
| 407 | |
|---|
| 408 | |
|---|
| 409 | |
|---|
| 410 | |
|---|
| 411 | |
|---|
| 412 | |
|---|
| 413 | |
|---|
| 414 | |
|---|
| 415 | AC_DEFUN([PAC_PROG_MAKE],[ |
|---|
| 416 | PAC_PROG_MAKE_PROGRAM |
|---|
| 417 | PAC_PROG_MAKE_CLOCK_SKEW |
|---|
| 418 | |
|---|
| 419 | PAC_PROG_MAKE_INCLUDE |
|---|
| 420 | PAC_PROG_MAKE_ALLOWS_COMMENTS |
|---|
| 421 | PAC_PROG_MAKE_VPATH |
|---|
| 422 | |
|---|
| 423 | |
|---|
| 424 | |
|---|
| 425 | |
|---|
| 426 | AC_SUBST(SET_CFLAGS)AM_IGNORE(SET_CFLAGS) |
|---|
| 427 | PAC_PROG_MAKE_SET_CFLAGS([SET_CFLAGS='CFLAGS=']) |
|---|
| 428 | if test "$pac_cv_prog_make_echos_dir" = "no" ; then |
|---|
| 429 | AC_PROG_MAKE_SET |
|---|
| 430 | else |
|---|
| 431 | SET_MAKE="MAKE=${MAKE-make}" |
|---|
| 432 | fi |
|---|
| 433 | ]) |
|---|