zz40-xc-ovr.m4 (18323B)
1 #--------------------------------------------------------------------------- 2 # 3 # zz40-xc-ovr.m4 4 # 5 # Copyright (C) Daniel Stenberg, <daniel@haxx.se> 6 # 7 # Permission to use, copy, modify, and distribute this software for any 8 # purpose with or without fee is hereby granted, provided that the above 9 # copyright notice and this permission notice appear in all copies. 10 # 11 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 12 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 13 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 # 19 # SPDX-License-Identifier: ISC 20 # 21 #--------------------------------------------------------------------------- 22 23 dnl The funny name of this file is intentional in order to make it 24 dnl sort alphabetically after any libtool, autoconf or automake 25 dnl provided .m4 macro file that might get copied into this same 26 dnl subdirectory. This allows that macro (re)definitions from this 27 dnl file may override those provided in other files. 28 29 30 dnl Version macros 31 dnl ------------------------------------------------- 32 dnl Public macros. 33 34 m4_define([XC_CONFIGURE_PREAMBLE_VER_MAJOR],[1])dnl 35 m4_define([XC_CONFIGURE_PREAMBLE_VER_MINOR],[0])dnl 36 37 38 dnl _XC_CFG_PRE_PREAMBLE 39 dnl ------------------------------------------------- 40 dnl Private macro. 41 42 AC_DEFUN([_XC_CFG_PRE_PREAMBLE], 43 [ 44 ## -------------------------------- ## 45 @%:@@%:@ [XC_CONFIGURE_PREAMBLE] ver: []dnl 46 XC_CONFIGURE_PREAMBLE_VER_MAJOR.[]dnl 47 XC_CONFIGURE_PREAMBLE_VER_MINOR ## 48 ## -------------------------------- ## 49 50 xc_configure_preamble_ver_major='XC_CONFIGURE_PREAMBLE_VER_MAJOR' 51 xc_configure_preamble_ver_minor='XC_CONFIGURE_PREAMBLE_VER_MINOR' 52 53 # 54 # Set IFS to space, tab and newline. 55 # 56 57 xc_space=' ' 58 xc_tab=' ' 59 xc_newline=' 60 ' 61 IFS="$xc_space$xc_tab$xc_newline" 62 63 # 64 # Set internationalization behavior variables. 65 # 66 67 LANG='C' 68 LC_ALL='C' 69 LANGUAGE='C' 70 export LANG 71 export LC_ALL 72 export LANGUAGE 73 74 # 75 # Some useful variables. 76 # 77 78 xc_msg_warn='configure: WARNING:' 79 xc_msg_abrt='Can not continue.' 80 xc_msg_err='configure: error:' 81 ]) 82 83 84 dnl _XC_CFG_PRE_BASIC_CHK_CMD_ECHO 85 dnl ------------------------------------------------- 86 dnl Private macro. 87 dnl 88 dnl Emits shell code that verifies that 'echo' command 89 dnl is available, otherwise aborts execution. 90 91 AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO], 92 [dnl 93 AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl 94 # 95 # Verify that 'echo' command is available, otherwise abort. 96 # 97 98 xc_tst_str='unknown' 99 (`echo "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success' 100 case "x$xc_tst_str" in @%:@ (( 101 xsuccess) 102 : 103 ;; 104 *) 105 # Try built-in echo, and fail. 106 echo "$xc_msg_err 'echo' command not found. $xc_msg_abrt" >&2 107 exit 1 108 ;; 109 esac 110 ]) 111 112 113 dnl _XC_CFG_PRE_BASIC_CHK_CMD_TEST 114 dnl ------------------------------------------------- 115 dnl Private macro. 116 dnl 117 dnl Emits shell code that verifies that 'test' command 118 dnl is available, otherwise aborts execution. 119 120 AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_TEST], 121 [dnl 122 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl 123 # 124 # Verify that 'test' command is available, otherwise abort. 125 # 126 127 xc_tst_str='unknown' 128 (`test -n "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success' 129 case "x$xc_tst_str" in @%:@ (( 130 xsuccess) 131 : 132 ;; 133 *) 134 echo "$xc_msg_err 'test' command not found. $xc_msg_abrt" >&2 135 exit 1 136 ;; 137 esac 138 ]) 139 140 141 dnl _XC_CFG_PRE_BASIC_CHK_VAR_PATH 142 dnl ------------------------------------------------- 143 dnl Private macro. 144 dnl 145 dnl Emits shell code that verifies that 'PATH' variable 146 dnl is set, otherwise aborts execution. 147 148 AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_VAR_PATH], 149 [dnl 150 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl 151 # 152 # Verify that 'PATH' variable is set, otherwise abort. 153 # 154 155 xc_tst_str='unknown' 156 (`test -n "$PATH" >/dev/null 2>&1`) && xc_tst_str='success' 157 case "x$xc_tst_str" in @%:@ (( 158 xsuccess) 159 : 160 ;; 161 *) 162 echo "$xc_msg_err 'PATH' variable not set. $xc_msg_abrt" >&2 163 exit 1 164 ;; 165 esac 166 ]) 167 168 169 dnl _XC_CFG_PRE_BASIC_CHK_CMD_EXPR 170 dnl ------------------------------------------------- 171 dnl Private macro. 172 dnl 173 dnl Emits shell code that verifies that 'expr' command 174 dnl is available, otherwise aborts execution. 175 176 AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR], 177 [dnl 178 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl 179 # 180 # Verify that 'expr' command is available, otherwise abort. 181 # 182 183 xc_tst_str='unknown' 184 xc_tst_str=`expr "$xc_tst_str" : '.*' 2>/dev/null` 185 case "x$xc_tst_str" in @%:@ (( 186 x7) 187 : 188 ;; 189 *) 190 echo "$xc_msg_err 'expr' command not found. $xc_msg_abrt" >&2 191 exit 1 192 ;; 193 esac 194 ]) 195 196 197 dnl _XC_CFG_PRE_BASIC_CHK_UTIL_SED 198 dnl ------------------------------------------------- 199 dnl Private macro. 200 dnl 201 dnl Emits shell code that verifies that 'sed' utility 202 dnl is found within 'PATH', otherwise aborts execution. 203 dnl 204 dnl This 'sed' is required in order to allow configure 205 dnl script bootstrapping itself. No fancy testing for a 206 dnl proper 'sed' this early, that should be done later. 207 208 AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_SED], 209 [dnl 210 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl 211 # 212 # Verify that 'sed' utility is found within 'PATH', otherwise abort. 213 # 214 215 xc_tst_str='unknown' 216 xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \ 217 | sed -e 's:unknown:success:' 2>/dev/null` 218 case "x$xc_tst_str" in @%:@ (( 219 xsuccess) 220 : 221 ;; 222 *) 223 echo "$xc_msg_err 'sed' utility not found in 'PATH'. $xc_msg_abrt" >&2 224 exit 1 225 ;; 226 esac 227 ]) 228 229 230 dnl _XC_CFG_PRE_BASIC_CHK_UTIL_GREP 231 dnl ------------------------------------------------- 232 dnl Private macro. 233 dnl 234 dnl Emits shell code that verifies that 'grep' utility 235 dnl is found within 'PATH', otherwise aborts execution. 236 dnl 237 dnl This 'grep' is required in order to allow configure 238 dnl script bootstrapping itself. No fancy testing for a 239 dnl proper 'grep' this early, that should be done later. 240 241 AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP], 242 [dnl 243 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl 244 # 245 # Verify that 'grep' utility is found within 'PATH', otherwise abort. 246 # 247 248 xc_tst_str='unknown' 249 (`echo "$xc_tst_str" 2>/dev/null \ 250 | grep 'unknown' >/dev/null 2>&1`) && xc_tst_str='success' 251 case "x$xc_tst_str" in @%:@ (( 252 xsuccess) 253 : 254 ;; 255 *) 256 echo "$xc_msg_err 'grep' utility not found in 'PATH'. $xc_msg_abrt" >&2 257 exit 1 258 ;; 259 esac 260 ]) 261 262 263 dnl _XC_CFG_PRE_BASIC_CHK_UTIL_TR 264 dnl ------------------------------------------------- 265 dnl Private macro. 266 dnl 267 dnl Emits shell code that verifies that 'tr' utility 268 dnl is found within 'PATH', otherwise aborts execution. 269 270 AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_TR], 271 [dnl 272 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl 273 # 274 # Verify that 'tr' utility is found within 'PATH', otherwise abort. 275 # 276 277 xc_tst_str="${xc_tab}98s7u6c5c4e3s2s10" 278 xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \ 279 | tr -d "0123456789$xc_tab" 2>/dev/null` 280 case "x$xc_tst_str" in @%:@ (( 281 xsuccess) 282 : 283 ;; 284 *) 285 echo "$xc_msg_err 'tr' utility not found in 'PATH'. $xc_msg_abrt" >&2 286 exit 1 287 ;; 288 esac 289 ]) 290 291 292 dnl _XC_CFG_PRE_BASIC_CHK_UTIL_WC 293 dnl ------------------------------------------------- 294 dnl Private macro. 295 dnl 296 dnl Emits shell code that verifies that 'wc' utility 297 dnl is found within 'PATH', otherwise aborts execution. 298 299 AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_WC], 300 [dnl 301 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl 302 # 303 # Verify that 'wc' utility is found within 'PATH', otherwise abort. 304 # 305 306 xc_tst_str='unknown unknown unknown unknown' 307 xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \ 308 | wc -w 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null` 309 case "x$xc_tst_str" in @%:@ (( 310 x4) 311 : 312 ;; 313 *) 314 echo "$xc_msg_err 'wc' utility not found in 'PATH'. $xc_msg_abrt" >&2 315 exit 1 316 ;; 317 esac 318 ]) 319 320 321 dnl _XC_CFG_PRE_BASIC_CHK_UTIL_CAT 322 dnl ------------------------------------------------- 323 dnl Private macro. 324 dnl 325 dnl Emits shell code that verifies that 'cat' utility 326 dnl is found within 'PATH', otherwise aborts execution. 327 328 AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT], 329 [dnl 330 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl 331 # 332 # Verify that 'cat' utility is found within 'PATH', otherwise abort. 333 # 334 335 xc_tst_str='unknown' 336 xc_tst_str=`cat <<_EOT 2>/dev/null \ 337 | wc -l 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null 338 unknown 339 unknown 340 unknown 341 _EOT` 342 case "x$xc_tst_str" in @%:@ (( 343 x3) 344 : 345 ;; 346 *) 347 echo "$xc_msg_err 'cat' utility not found in 'PATH'. $xc_msg_abrt" >&2 348 exit 1 349 ;; 350 esac 351 ]) 352 353 354 dnl _XC_CFG_PRE_CHECK_PATH_SEPARATOR 355 dnl ------------------------------------------------- 356 dnl Private macro. 357 dnl 358 dnl Emits shell code that computes the path separator 359 dnl and stores the result in 'PATH_SEPARATOR', unless 360 dnl the user has already set it with a non-empty value. 361 dnl 362 dnl This path separator is the symbol used to separate 363 dnl or differentiate paths inside the 'PATH' environment 364 dnl variable. 365 dnl 366 dnl Non-empty user provided 'PATH_SEPARATOR' always 367 dnl overrides the auto-detected one. 368 369 AC_DEFUN([_XC_CFG_PRE_CHECK_PATH_SEPARATOR], 370 [dnl 371 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl 372 # 373 # Auto-detect and set 'PATH_SEPARATOR', unless it is already non-empty set. 374 # 375 376 # Directory count in 'PATH' when using a colon separator. 377 xc_tst_dirs_col='x' 378 xc_tst_prev_IFS=$IFS; IFS=':' 379 for xc_tst_dir in $PATH; do 380 IFS=$xc_tst_prev_IFS 381 xc_tst_dirs_col="x$xc_tst_dirs_col" 382 done 383 IFS=$xc_tst_prev_IFS 384 xc_tst_dirs_col=`expr "$xc_tst_dirs_col" : '.*'` 385 386 # Directory count in 'PATH' when using a semicolon separator. 387 xc_tst_dirs_sem='x' 388 xc_tst_prev_IFS=$IFS; IFS=';' 389 for xc_tst_dir in $PATH; do 390 IFS=$xc_tst_prev_IFS 391 xc_tst_dirs_sem="x$xc_tst_dirs_sem" 392 done 393 IFS=$xc_tst_prev_IFS 394 xc_tst_dirs_sem=`expr "$xc_tst_dirs_sem" : '.*'` 395 396 if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then 397 # When both counting methods give the same result we do not want to 398 # chose one over the other, and consider auto-detection not possible. 399 if test -z "$PATH_SEPARATOR"; then 400 # User should provide the correct 'PATH_SEPARATOR' definition. 401 # Until then, guess that it is colon! 402 echo "$xc_msg_warn path separator not determined, guessing colon" >&2 403 PATH_SEPARATOR=':' 404 fi 405 else 406 # Separator with the greater directory count is the auto-detected one. 407 if test $xc_tst_dirs_sem -gt $xc_tst_dirs_col; then 408 xc_tst_auto_separator=';' 409 else 410 xc_tst_auto_separator=':' 411 fi 412 if test -z "$PATH_SEPARATOR"; then 413 # Simply use the auto-detected one when not already set. 414 PATH_SEPARATOR=$xc_tst_auto_separator 415 elif test "x$PATH_SEPARATOR" != "x$xc_tst_auto_separator"; then 416 echo "$xc_msg_warn 'PATH_SEPARATOR' does not match auto-detected one." >&2 417 fi 418 fi 419 xc_PATH_SEPARATOR=$PATH_SEPARATOR 420 AC_SUBST([PATH_SEPARATOR])dnl 421 ]) 422 423 424 dnl _XC_CFG_PRE_POSTLUDE 425 dnl ------------------------------------------------- 426 dnl Private macro. 427 428 AC_DEFUN([_XC_CFG_PRE_POSTLUDE], 429 [dnl 430 AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl 431 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl 432 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl 433 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl 434 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl 435 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl 436 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl 437 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl 438 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl 439 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl 440 AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl 441 dnl 442 xc_configure_preamble_result='yes' 443 ]) 444 445 446 dnl XC_CONFIGURE_PREAMBLE 447 dnl ------------------------------------------------- 448 dnl Public macro. 449 dnl 450 dnl This macro emits shell code which does some 451 dnl very basic checks related with the availability 452 dnl of some commands and utilities needed to allow 453 dnl configure script bootstrapping itself when using 454 dnl these to figure out other settings. Also emits 455 dnl code that performs PATH_SEPARATOR auto-detection 456 dnl and sets its value unless it is already set with 457 dnl a non-empty value. 458 dnl 459 dnl These basic checks are intended to be placed and 460 dnl executed as early as possible in the resulting 461 dnl configure script, and as such these must be pure 462 dnl and portable shell code. 463 dnl 464 dnl This macro may be used directly, or indirectly 465 dnl when using other macros that AC_REQUIRE it such 466 dnl as XC_CHECK_PATH_SEPARATOR. 467 dnl 468 dnl Currently the mechanism used to ensure that this 469 dnl macro expands early enough in generated configure 470 dnl script is making it override autoconf and libtool 471 dnl PATH_SEPARATOR check. 472 473 AC_DEFUN([XC_CONFIGURE_PREAMBLE], 474 [dnl 475 AC_PREREQ([2.50])dnl 476 dnl 477 AC_BEFORE([$0],[_XC_CFG_PRE_PREAMBLE])dnl 478 AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl 479 AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl 480 AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl 481 AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl 482 AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl 483 AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl 484 AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl 485 AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl 486 AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl 487 AC_BEFORE([$0],[_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl 488 AC_BEFORE([$0],[_XC_CFG_PRE_POSTLUDE])dnl 489 dnl 490 AC_BEFORE([$0],[AC_CHECK_TOOL])dnl 491 AC_BEFORE([$0],[AC_CHECK_PROG])dnl 492 AC_BEFORE([$0],[AC_CHECK_TOOLS])dnl 493 AC_BEFORE([$0],[AC_CHECK_PROGS])dnl 494 dnl 495 AC_BEFORE([$0],[AC_PATH_TOOL])dnl 496 AC_BEFORE([$0],[AC_PATH_PROG])dnl 497 AC_BEFORE([$0],[AC_PATH_PROGS])dnl 498 dnl 499 AC_BEFORE([$0],[AC_PROG_SED])dnl 500 AC_BEFORE([$0],[AC_PROG_GREP])dnl 501 AC_BEFORE([$0],[AC_PROG_LN_S])dnl 502 AC_BEFORE([$0],[AC_PROG_MKDIR_P])dnl 503 AC_BEFORE([$0],[AC_PROG_INSTALL])dnl 504 AC_BEFORE([$0],[AC_PROG_MAKE_SET])dnl 505 AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl 506 dnl 507 AC_BEFORE([$0],[LT_INIT])dnl 508 AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl 509 AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl 510 dnl 511 AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl 512 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl 513 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl 514 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl 515 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl 516 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl 517 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl 518 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl 519 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl 520 AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl 521 AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl 522 AC_REQUIRE([_XC_CFG_PRE_POSTLUDE])dnl 523 dnl 524 m4_pattern_forbid([^_*XC])dnl 525 m4_define([$0],[])dnl 526 ]) 527 528 529 dnl Override autoconf and libtool PATH_SEPARATOR check 530 dnl ------------------------------------------------- 531 dnl Macros overriding. 532 dnl 533 dnl This is done to ensure that the same check is 534 dnl used across different autoconf versions and to 535 dnl allow expansion of XC_CONFIGURE_PREAMBLE macro 536 dnl early enough in the generated configure script. 537 538 dnl 539 dnl Override when using autoconf 2.53 and newer. 540 dnl 541 542 m4_ifdef([_AS_PATH_SEPARATOR_PREPARE], 543 [dnl 544 m4_undefine([_AS_PATH_SEPARATOR_PREPARE])dnl 545 m4_defun([_AS_PATH_SEPARATOR_PREPARE], 546 [dnl 547 AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl 548 m4_define([$0],[])dnl 549 ])dnl 550 ]) 551 552 dnl 553 dnl Override when using autoconf 2.50 to 2.52 554 dnl 555 556 m4_ifdef([_AC_INIT_PREPARE_FS_SEPARATORS], 557 [dnl 558 m4_undefine([_AC_INIT_PREPARE_FS_SEPARATORS])dnl 559 m4_defun([_AC_INIT_PREPARE_FS_SEPARATORS], 560 [dnl 561 AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl 562 ac_path_separator=$PATH_SEPARATOR 563 m4_define([$0],[])dnl 564 ])dnl 565 ]) 566 567 dnl 568 dnl Override when using libtool 1.4.2 569 dnl 570 571 m4_ifdef([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], 572 [dnl 573 m4_undefine([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl 574 m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], 575 [dnl 576 AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl 577 lt_cv_sys_path_separator=$PATH_SEPARATOR 578 m4_define([$0],[])dnl 579 ])dnl 580 ]) 581 582 583 dnl XC_CHECK_PATH_SEPARATOR 584 dnl ------------------------------------------------- 585 dnl Public macro. 586 dnl 587 dnl Usage of this macro ensures that generated configure 588 dnl script uses the same PATH_SEPARATOR check irrespective 589 dnl of autoconf or libtool version being used to generate 590 dnl configure script. 591 dnl 592 dnl Emits shell code that computes the path separator 593 dnl and stores the result in 'PATH_SEPARATOR', unless 594 dnl the user has already set it with a non-empty value. 595 dnl 596 dnl This path separator is the symbol used to separate 597 dnl or differentiate paths inside the 'PATH' environment 598 dnl variable. 599 dnl 600 dnl Non-empty user provided 'PATH_SEPARATOR' always 601 dnl overrides the auto-detected one. 602 dnl 603 dnl Strictly speaking the check is done in two steps. The 604 dnl first, which does the actual check, takes place in 605 dnl XC_CONFIGURE_PREAMBLE macro and happens very early in 606 dnl generated configure script. The second one shows and 607 dnl logs the result of the check into config.log at a later 608 dnl configure stage. Placement of this second stage in 609 dnl generated configure script will be done where first 610 dnl direct or indirect usage of this macro happens. 611 612 AC_DEFUN([XC_CHECK_PATH_SEPARATOR], 613 [dnl 614 AC_PREREQ([2.50])dnl 615 dnl 616 AC_BEFORE([$0],[AC_CHECK_TOOL])dnl 617 AC_BEFORE([$0],[AC_CHECK_PROG])dnl 618 AC_BEFORE([$0],[AC_CHECK_TOOLS])dnl 619 AC_BEFORE([$0],[AC_CHECK_PROGS])dnl 620 dnl 621 AC_BEFORE([$0],[AC_PATH_TOOL])dnl 622 AC_BEFORE([$0],[AC_PATH_PROG])dnl 623 AC_BEFORE([$0],[AC_PATH_PROGS])dnl 624 dnl 625 AC_BEFORE([$0],[AC_PROG_SED])dnl 626 AC_BEFORE([$0],[AC_PROG_GREP])dnl 627 AC_BEFORE([$0],[AC_PROG_LN_S])dnl 628 AC_BEFORE([$0],[AC_PROG_MKDIR_P])dnl 629 AC_BEFORE([$0],[AC_PROG_INSTALL])dnl 630 AC_BEFORE([$0],[AC_PROG_MAKE_SET])dnl 631 AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl 632 dnl 633 AC_BEFORE([$0],[LT_INIT])dnl 634 AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl 635 AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl 636 dnl 637 AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl 638 dnl 639 # 640 # Check that 'XC_CONFIGURE_PREAMBLE' has already run. 641 # 642 643 if test -z "$xc_configure_preamble_result"; then 644 AC_MSG_ERROR([xc_configure_preamble_result not set (internal problem)]) 645 fi 646 647 # 648 # Check that 'PATH_SEPARATOR' has already been set. 649 # 650 651 if test -z "$xc_PATH_SEPARATOR"; then 652 AC_MSG_ERROR([xc_PATH_SEPARATOR not set (internal problem)]) 653 fi 654 if test -z "$PATH_SEPARATOR"; then 655 AC_MSG_ERROR([PATH_SEPARATOR not set (internal or config.site problem)]) 656 fi 657 AC_MSG_CHECKING([for path separator]) 658 AC_MSG_RESULT([$PATH_SEPARATOR]) 659 if test "x$PATH_SEPARATOR" != "x$xc_PATH_SEPARATOR"; then 660 AC_MSG_CHECKING([for initial path separator]) 661 AC_MSG_RESULT([$xc_PATH_SEPARATOR]) 662 AC_MSG_ERROR([path separator mismatch (internal or config.site problem)]) 663 fi 664 dnl 665 m4_pattern_forbid([^_*XC])dnl 666 m4_define([$0],[])dnl 667 ])