Changeset 1910 for ncurses/vendor/current/aclocal.m4
- Timestamp:
- Jan 13, 2017, 3:21:12 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified ncurses/vendor/current/aclocal.m4 ¶
r85 r1910 1 1 dnl*************************************************************************** 2 dnl Copyright (c) 1998-20 07,2008Free Software Foundation, Inc. *2 dnl Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. * 3 3 dnl * 4 4 dnl Permission is hereby granted, free of charge, to any person obtaining a * … … 29 29 dnl Author: Thomas E. Dickey 1995-on 30 30 dnl 31 dnl $Id: aclocal.m4,v 1. 470 2008/10/25 22:15:32tom Exp $31 dnl $Id: aclocal.m4,v 1.553 2011/03/31 23:35:38 tom Exp $ 32 32 dnl Macros used in NCURSES auto-configuration script. 33 33 dnl … … 63 63 ])dnl 64 64 dnl --------------------------------------------------------------------------- 65 dnl CF_ADA_INCLUDE_DIRS version: 5 updated: 2006/10/14 15:23:1565 dnl CF_ADA_INCLUDE_DIRS version: 6 updated: 2010/02/26 19:52:07 66 66 dnl ------------------- 67 67 dnl Construct the list of include-options for the C programs in the Ada95 … … 69 69 AC_DEFUN([CF_ADA_INCLUDE_DIRS], 70 70 [ 71 ACPPFLAGS="-I. -I../ ../include $ACPPFLAGS"71 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS" 72 72 if test "$srcdir" != "."; then 73 73 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS" … … 87 87 ])dnl 88 88 dnl --------------------------------------------------------------------------- 89 dnl CF_ADD_CFLAGS version: 7 updated: 2004/04/25 17:48:30 89 dnl CF_ADD_ADAFLAGS version: 1 updated: 2010/06/19 15:22:18 90 dnl --------------- 91 dnl Add to $ADAFLAGS, which is substituted into makefile and scripts. 92 AC_DEFUN([CF_ADD_ADAFLAGS],[ 93 ADAFLAGS="$ADAFLAGS $1" 94 AC_SUBST(ADAFLAGS) 95 ])dnl 96 dnl --------------------------------------------------------------------------- 97 dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42 90 98 dnl ------------- 91 99 dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS … … 113 121 114 122 test "${cf_add_cflags}" != "${cf_tst_cflags}" \ 115 && test -z "${cf_tst_cflags}" \116 && cf_fix_cppflags=yes123 && test -z "${cf_tst_cflags}" \ 124 && cf_fix_cppflags=yes 117 125 118 126 if test $cf_fix_cppflags = yes ; then … … 129 137 ;; 130 138 *) #(vi 139 case $cf_add_cflags in #(vi 140 -D*) 141 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` 142 CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags) 143 ;; 144 esac 131 145 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" 132 146 ;; … … 144 158 145 159 test "${cf_add_cflags}" != "${cf_tst_cflags}" \ 146 && test -z "${cf_tst_cflags}" \147 && cf_fix_cppflags=no160 && test -z "${cf_tst_cflags}" \ 161 && cf_fix_cppflags=no 148 162 ;; 149 163 esac … … 151 165 152 166 if test -n "$cf_new_cflags" ; then 153 ifelse( $2,,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)])167 ifelse([$2],,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)]) 154 168 CFLAGS="$CFLAGS $cf_new_cflags" 155 169 fi 156 170 157 171 if test -n "$cf_new_cppflags" ; then 158 ifelse( $2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])159 CPPFLAGS="$ cf_new_cppflags $CPPFLAGS"172 ifelse([$2],,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)]) 173 CPPFLAGS="$CPPFLAGS $cf_new_cppflags" 160 174 fi 161 175 162 176 if test -n "$cf_new_extra_cppflags" ; then 163 ifelse( $2,,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)])177 ifelse([$2],,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)]) 164 178 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" 165 179 fi … … 169 183 ])dnl 170 184 dnl --------------------------------------------------------------------------- 171 dnl CF_ADD_INCDIR version: 9 updated: 2008/02/09 13:15:34185 dnl CF_ADD_INCDIR version: 13 updated: 2010/05/26 16:44:57 172 186 dnl ------------- 173 187 dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's … … 196 210 197 211 if test "$cf_have_incdir" = no ; then 198 212 if test "$cf_add_incdir" = /usr/local/include ; then 199 213 if test "$GCC" = yes 200 214 then … … 212 226 if test "$cf_have_incdir" = no ; then 213 227 CF_VERBOSE(adding $cf_add_incdir to include-path) 214 ifelse( $2,,CPPFLAGS,$2)="-I$cf_add_incdir $ifelse($2,,CPPFLAGS,[$]$2)"215 216 217 218 228 ifelse([$2],,CPPFLAGS,[$2])="$ifelse([$2],,CPPFLAGS,[$2]) -I$cf_add_incdir" 229 230 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'` 231 test "$cf_top_incdir" = "$cf_add_incdir" && break 232 cf_add_incdir="$cf_top_incdir" 219 233 else 220 234 break … … 226 240 ])dnl 227 241 dnl --------------------------------------------------------------------------- 228 dnl CF_ADD_LIBDIR version: 6 updated: 2008/02/09 13:15:34 242 dnl CF_ADD_LIB version: 2 updated: 2010/06/02 05:03:05 243 dnl ---------- 244 dnl Add a library, used to enforce consistency. 245 dnl 246 dnl $1 = library to add, without the "-l" 247 dnl $2 = variable to update (default $LIBS) 248 AC_DEFUN([CF_ADD_LIB],[CF_ADD_LIBS(-l$1,ifelse($2,,LIBS,[$2]))])dnl 249 dnl --------------------------------------------------------------------------- 250 dnl CF_ADD_LIBDIR version: 9 updated: 2010/05/26 16:44:57 229 251 dnl ------------- 230 252 dnl Adds to the library-path … … 255 277 if test "$cf_have_libdir" = no ; then 256 278 CF_VERBOSE(adding $cf_add_libdir to library-path) 257 ifelse( $2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,[$]$2)"279 ifelse([$2],,LDFLAGS,[$2])="-L$cf_add_libdir $ifelse([$2],,LDFLAGS,[$2])" 258 280 fi 259 281 fi … … 262 284 ])dnl 263 285 dnl --------------------------------------------------------------------------- 264 dnl CF_ADD_SUBDIR_PATH version: 2 updated: 2007/07/29 10:12:59 286 dnl CF_ADD_LIBS version: 1 updated: 2010/06/02 05:03:05 287 dnl ----------- 288 dnl Add one or more libraries, used to enforce consistency. 289 dnl 290 dnl $1 = libraries to add, with the "-l", etc. 291 dnl $2 = variable to update (default $LIBS) 292 AC_DEFUN([CF_ADD_LIBS],[ifelse($2,,LIBS,[$2])="$1 [$]ifelse($2,,LIBS,[$2])"])dnl 293 dnl --------------------------------------------------------------------------- 294 dnl CF_ADD_SUBDIR_PATH version: 3 updated: 2010/07/03 20:58:12 265 295 dnl ------------------ 266 296 dnl Append to a search-list for a nonstandard header/lib-file … … 274 304 test "$4" != "$5" && \ 275 305 test -d "$4" && \ 276 ifelse([$5],NONE,,[(test $5 = NONE || test -d $5) &&]) {306 ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) { 277 307 test -n "$verbose" && echo " ... testing for $3-directories under $4" 278 308 test -d $4/$3 && $1="[$]$1 $4/$3" … … 284 314 ])dnl 285 315 dnl --------------------------------------------------------------------------- 286 dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34316 dnl CF_ANSI_CC_CHECK version: 10 updated: 2010/10/23 15:52:32 287 317 dnl ---------------- 288 318 dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES' … … 290 320 AC_DEFUN([CF_ANSI_CC_CHECK], 291 321 [ 292 AC_CACHE_CHECK(for ${CC -cc} option to accept ANSI C, cf_cv_ansi_cc,[322 AC_CACHE_CHECK(for ${CC:-cc} option to accept ANSI C, cf_cv_ansi_cc,[ 293 323 cf_cv_ansi_cc=no 294 324 cf_save_CFLAGS="$CFLAGS" … … 354 384 ])dnl 355 385 dnl --------------------------------------------------------------------------- 356 dnl CF_AWK_BIG_PRINTF version: 2 updated: 2008/10/04 17:16:18 386 dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31 387 dnl -------------- 388 dnl Allow user to disable a normally-on option. 389 AC_DEFUN([CF_ARG_DISABLE], 390 [CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl 391 dnl --------------------------------------------------------------------------- 392 dnl CF_ARG_OPTION version: 4 updated: 2010/05/26 05:38:42 393 dnl ------------- 394 dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus 395 dnl values. 396 dnl 397 dnl Parameters: 398 dnl $1 = option name 399 dnl $2 = help-string 400 dnl $3 = action to perform if option is not default 401 dnl $4 = action if perform if option is default 402 dnl $5 = default option value (either 'yes' or 'no') 403 AC_DEFUN([CF_ARG_OPTION], 404 [AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes) 405 if test "$enableval" != "$5" ; then 406 ifelse([$3],,[ :]dnl 407 ,[ $3]) ifelse([$4],,,[ 408 else 409 $4]) 410 fi],[enableval=$5 ifelse([$4],,,[ 411 $4 412 ])dnl 413 ])])dnl 414 dnl --------------------------------------------------------------------------- 415 dnl CF_AR_FLAGS version: 5 updated: 2010/05/20 20:24:29 416 dnl ----------- 417 dnl Check for suitable "ar" (archiver) options for updating an archive. 418 AC_DEFUN([CF_AR_FLAGS],[ 419 AC_REQUIRE([CF_PROG_AR]) 420 421 AC_CACHE_CHECK(for options to update archives, cf_cv_ar_flags,[ 422 cf_cv_ar_flags=unknown 423 for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv 424 do 425 426 # check if $ARFLAGS already contains this choice 427 if test "x$ARFLAGS" != "x" ; then 428 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"` 429 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then 430 cf_cv_ar_flags= 431 break 432 fi 433 fi 434 435 rm -f conftest.$ac_cv_objext 436 rm -f conftest.a 437 438 cat >conftest.$ac_ext <<EOF 439 #line __oline__ "configure" 440 int testdata[[3]] = { 123, 456, 789 }; 441 EOF 442 if AC_TRY_EVAL(ac_compile) ; then 443 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&AC_FD_CC 444 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&AC_FD_CC 1>/dev/null 445 if test -f conftest.a ; then 446 cf_cv_ar_flags=$cf_ar_flags 447 break 448 fi 449 else 450 CF_VERBOSE(cannot compile test-program) 451 break 452 fi 453 done 454 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext 455 ]) 456 457 if test -n "$ARFLAGS" ; then 458 if test -n "$cf_cv_ar_flags" ; then 459 ARFLAGS="$ARFLAGS $cf_cv_ar_flags" 460 fi 461 else 462 ARFLAGS=$cf_cv_ar_flags 463 fi 464 465 AC_SUBST(ARFLAGS) 466 ]) 467 dnl --------------------------------------------------------------------------- 468 dnl CF_AWK_BIG_PRINTF version: 3 updated: 2008/12/27 12:30:03 357 469 dnl ----------------- 358 470 dnl Check if awk can handle big strings using printf. Some older versions of … … 363 475 AC_DEFUN([CF_AWK_BIG_PRINTF], 364 476 [ 365 366 367 368 369 370 371 372 373 374 375 376 377 477 case x$AWK in #(vi 478 x) 479 eval $2=no 480 ;; 481 *) #(vi 482 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < $1) { xx = xx "x"; }; printf("%s\n", xx); }' \ 483 | $AWK '{ printf "%d\n", length([$]0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ([$]0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then 484 eval $2=yes 485 else 486 eval $2=no 487 fi 488 ;; 489 esac 378 490 ])dnl 379 491 dnl --------------------------------------------------------------------------- … … 696 808 ])dnl 697 809 dnl --------------------------------------------------------------------------- 698 dnl CF_CHECK_ERRNO version: 1 0 updated: 2008/08/22 16:33:22810 dnl CF_CHECK_ERRNO version: 11 updated: 2010/05/26 05:38:42 699 811 dnl -------------- 700 812 dnl Check for data that is usually declared in <stdio.h> or <errno.h>, e.g., … … 714 826 #include <sys/types.h> 715 827 #include <errno.h> ], 716 ifelse( $2,,int,$2) x = (ifelse($2,,int,$2)) $1,828 ifelse([$2],,int,[$2]) x = (ifelse([$2],,int,[$2])) $1, 717 829 [cf_cv_dcl_$1=yes], 718 830 [cf_cv_dcl_$1=no]) … … 725 837 726 838 # It's possible (for near-UNIX clones) that the data doesn't exist 727 CF_CHECK_EXTERN_DATA($1,ifelse( $2,,int,$2))839 CF_CHECK_EXTERN_DATA($1,ifelse([$2],,int,[$2])) 728 840 ])dnl 729 841 dnl --------------------------------------------------------------------------- … … 753 865 ])dnl 754 866 dnl --------------------------------------------------------------------------- 755 dnl CF_CHECK_GPM_WGETCH version: 1 updated: 2007/04/28 14:38:06867 dnl CF_CHECK_GPM_WGETCH version: 2 updated: 2010/08/14 18:25:37 756 868 dnl ------------------- 757 869 dnl Check if GPM is already linked with curses. If so - and if the linkage … … 787 899 fi 788 900 fi 789 rm - f conftest*901 rm -rf conftest* 790 902 LIBS="$cf_save_LIBS" 791 903 fi … … 888 1000 ])dnl 889 1001 dnl --------------------------------------------------------------------------- 890 dnl CF_C_INLINE version: 2 updated: 2007/08/11 14:09:501002 dnl CF_C_INLINE version: 3 updated: 2010/05/01 15:14:41 891 1003 dnl ----------- 892 1004 dnl Check if the C compiler supports "inline". … … 903 1015 elif test "$GCC" = yes 904 1016 then 905 AC_CACHE_CHECK(if gccsupports options to tune inlining,cf_cv_gcc_inline,[1017 AC_CACHE_CHECK(if $CC supports options to tune inlining,cf_cv_gcc_inline,[ 906 1018 cf_save_CFLAGS=$CFLAGS 907 1019 CFLAGS="$CFLAGS --param max-inline-insns-single=$2" … … 946 1058 ])dnl 947 1059 dnl --------------------------------------------------------------------------- 948 dnl CF_DISABLE_LEAKS version: 4 updated: 2006/12/16 15:10:421060 dnl CF_DISABLE_LEAKS version: 6 updated: 2010/07/23 04:14:32 949 1061 dnl ---------------- 950 1062 dnl Combine no-leak checks with the libraries or tools that are used for the … … 959 1071 AC_ARG_ENABLE(leaks, 960 1072 [ --disable-leaks test: free permanent memory, analyze leaks], 961 [ with_no_leaks=yes],1073 [if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi], 962 1074 : ${with_no_leaks:=no}) 963 1075 AC_MSG_RESULT($with_no_leaks) … … 965 1077 if test "$with_no_leaks" = yes ; then 966 1078 AC_DEFINE(NO_LEAKS) 967 fi 968 ])dnl 969 dnl --------------------------------------------------------------------------- 970 dnl CF_ENABLE_RPATH version: 1 updated: 2008/09/13 10:22:30 1079 AC_DEFINE(YY_NO_LEAKS) 1080 fi 1081 ])dnl 1082 dnl --------------------------------------------------------------------------- 1083 dnl CF_DISABLE_LIBTOOL_VERSION version: 1 updated: 2010/05/15 15:45:59 1084 dnl -------------------------- 1085 dnl Check if we should use the libtool 1.5 feature "-version-number" instead of 1086 dnl the older "-version-info" feature. The newer feature allows us to use 1087 dnl version numbering on shared libraries which make them compatible with 1088 dnl various systems. 1089 AC_DEFUN([CF_DISABLE_LIBTOOL_VERSION], 1090 [ 1091 AC_MSG_CHECKING(if libtool -version-number should be used) 1092 CF_ARG_DISABLE(libtool-version, 1093 [ --disable-libtool-version enable to use libtool's incompatible naming scheme], 1094 [cf_libtool_version=no], 1095 [cf_libtool_version=yes]) 1096 AC_MSG_RESULT($cf_libtool_version) 1097 1098 if test "$cf_libtool_version" = yes ; then 1099 LIBTOOL_VERSION="-version-number" 1100 else 1101 LIBTOOL_VERSION="-version-info" 1102 fi 1103 1104 AC_SUBST(LIBTOOL_VERSION) 1105 ])dnl 1106 dnl --------------------------------------------------------------------------- 1107 dnl CF_DISABLE_RPATH_HACK version: 2 updated: 2011/02/13 13:31:33 1108 dnl --------------------- 1109 dnl The rpath-hack makes it simpler to build programs, particularly with the 1110 dnl *BSD ports which may have essential libraries in unusual places. But it 1111 dnl can interfere with building an executable for the base system. Use this 1112 dnl option in that case. 1113 AC_DEFUN([CF_DISABLE_RPATH_HACK], 1114 [ 1115 AC_MSG_CHECKING(if rpath-hack should be disabled) 1116 CF_ARG_DISABLE(rpath-hack, 1117 [ --disable-rpath-hack don't add rpath options for additional libraries], 1118 [cf_disable_rpath_hack=yes], 1119 [cf_disable_rpath_hack=no]) 1120 AC_MSG_RESULT($cf_disable_rpath_hack) 1121 if test "$cf_disable_rpath_hack" = no ; then 1122 CF_RPATH_HACK 1123 fi 1124 ]) 1125 dnl --------------------------------------------------------------------------- 1126 dnl CF_ENABLE_RPATH version: 2 updated: 2010/03/27 18:39:42 971 1127 dnl --------------- 972 1128 dnl Check if the rpath option should be used, setting cache variable 973 dnl cf_cv_ ld_rpath if so.1129 dnl cf_cv_enable_rpath if so. 974 1130 AC_DEFUN([CF_ENABLE_RPATH], 975 1131 [ … … 977 1133 AC_ARG_ENABLE(rpath, 978 1134 [ --enable-rpath use rpath option when generating shared libraries], 979 [cf_cv_ ld_rpath=$enableval],980 [cf_cv_ ld_rpath=no])981 AC_MSG_RESULT($cf_cv_ ld_rpath)1135 [cf_cv_enable_rpath=$enableval], 1136 [cf_cv_enable_rpath=no]) 1137 AC_MSG_RESULT($cf_cv_enable_rpath) 982 1138 ])dnl 983 1139 dnl --------------------------------------------------------------------------- … … 1020 1176 ]) 1021 1177 dnl --------------------------------------------------------------------------- 1022 dnl CF_FIND_LINKAGE version: 1 2 updated: 2007/07/29 20:13:531178 dnl CF_FIND_LINKAGE version: 19 updated: 2010/05/29 16:31:02 1023 1179 dnl --------------- 1024 1180 dnl Find a library (specifically the linkage used in the code fragment), … … 1049 1205 CF_MSG_LOG([Starting [FIND_LINKAGE]($3,$6)]) 1050 1206 1051 AC_TRY_LINK([$1],[$2], 1052 cf_cv_find_linkage_$3=yes,[ 1053 cf_cv_find_linkage_$3=no 1054 1207 cf_save_LIBS="$LIBS" 1208 1209 AC_TRY_LINK([$1],[$2],[ 1210 cf_cv_find_linkage_$3=yes 1211 cf_cv_header_path_$3=/usr/include 1212 cf_cv_library_path_$3=/usr/lib 1213 ],[ 1214 1215 LIBS="-l$3 $7 $cf_save_LIBS" 1216 1217 AC_TRY_LINK([$1],[$2],[ 1218 cf_cv_find_linkage_$3=yes 1219 cf_cv_header_path_$3=/usr/include 1220 cf_cv_library_path_$3=/usr/lib 1221 cf_cv_library_file_$3="-l$3" 1222 ],[ 1223 cf_cv_find_linkage_$3=no 1224 LIBS="$cf_save_LIBS" 1225 1226 CF_VERBOSE(find linkage for $3 library) 1055 1227 CF_MSG_LOG([Searching for headers in [FIND_LINKAGE]($3,$6)]) 1056 1228 … … 1111 1283 fi 1112 1284 done 1113 LIBS="$cf_save_LIBS"1114 1285 CPPFLAGS="$cf_save_CPPFLAGS" 1115 1286 LDFLAGS="$cf_save_LDFLAGS" … … 1120 1291 fi 1121 1292 ],$7) 1293 ]) 1294 1295 LIBS="$cf_save_LIBS" 1122 1296 1123 1297 if test "$cf_cv_find_linkage_$3" = yes ; then 1124 1298 ifelse([$4],,[ 1125 1126 1127 LIBS="-l$3 $LIBS" 1299 CF_ADD_INCDIR($cf_cv_header_path_$3) 1300 CF_ADD_LIBDIR($cf_cv_library_path_$3) 1301 CF_ADD_LIB($3) 1128 1302 ],[$4]) 1129 1303 else … … 1132 1306 ])dnl 1133 1307 dnl --------------------------------------------------------------------------- 1134 dnl CF_FUNC_DLSYM version: 1 updated: 2004/06/16 20:52:451308 dnl CF_FUNC_DLSYM version: 2 updated: 2010/05/29 16:31:02 1135 1309 dnl ------------- 1136 1310 dnl Test for dlsym() and related functions, as well as libdl. … … 1149 1323 1150 1324 if test "$cf_have_dlsym" = yes ; then 1151 test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"1325 test "$cf_have_libdl" = yes && CF_ADD_LIB(dl) 1152 1326 1153 1327 AC_MSG_CHECKING(whether able to link to dl*() functions) … … 1232 1406 ]) 1233 1407 dnl --------------------------------------------------------------------------- 1234 dnl CF_FUNC_OPENPTY version: 2 updated: 2008/04/12 19:49:011408 dnl CF_FUNC_OPENPTY version: 3 updated: 2010/05/29 16:31:02 1235 1409 dnl --------------- 1236 1410 dnl Check for openpty() function, along with <pty.h> header. It may need the … … 1241 1415 AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[ 1242 1416 cf_save_LIBS="$LIBS" 1243 test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"1417 test $cf_cv_lib_util = yes && CF_ADD_LIB(util) 1244 1418 for cf_header in pty.h libutil.h util.h 1245 1419 do … … 1363 1537 ])dnl 1364 1538 dnl --------------------------------------------------------------------------- 1365 dnl CF_GCC_ATTRIBUTES version: 1 1 updated: 2007/07/29 09:55:121539 dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32 1366 1540 dnl ----------------- 1367 1541 dnl Test for availability of useful gcc __attribute__ directives to quiet … … 1390 1564 AC_CHECKING([for $CC __attribute__ directives]) 1391 1565 cat > conftest.$ac_ext <<EOF 1392 #line __oline__ "${as_me -configure}"1566 #line __oline__ "${as_me:-configure}" 1393 1567 #include "confdefs.h" 1394 1568 #include "conftest.h" … … 1409 1583 int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; } 1410 1584 EOF 1585 cf_printf_attribute=no 1586 cf_scanf_attribute=no 1411 1587 for cf_attribute in scanf printf unused noreturn 1412 1588 do … … 1414 1590 cf_directive="__attribute__(($cf_attribute))" 1415 1591 echo "checking for $CC $cf_directive" 1>&AC_FD_CC 1416 case $cf_attribute in 1417 scanf|printf) 1418 cat >conftest.h <<EOF 1592 1593 case $cf_attribute in #(vi 1594 printf) #(vi 1595 cf_printf_attribute=yes 1596 cat >conftest.h <<EOF 1419 1597 #define GCC_$cf_ATTRIBUTE 1 1420 1598 EOF 1421 1599 ;; 1422 *) 1423 cat >conftest.h <<EOF 1600 scanf) #(vi 1601 cf_scanf_attribute=yes 1602 cat >conftest.h <<EOF 1603 #define GCC_$cf_ATTRIBUTE 1 1604 EOF 1605 ;; 1606 *) #(vi 1607 cat >conftest.h <<EOF 1424 1608 #define GCC_$cf_ATTRIBUTE $cf_directive 1425 1609 EOF 1426 1610 ;; 1427 1611 esac 1612 1428 1613 if AC_TRY_EVAL(ac_compile); then 1429 1614 test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute) 1430 1615 cat conftest.h >>confdefs.h 1616 case $cf_attribute in #(vi 1617 printf) #(vi 1618 if test "$cf_printf_attribute" = no ; then 1619 cat >>confdefs.h <<EOF 1620 #define GCC_PRINTFLIKE(fmt,var) /* nothing */ 1621 EOF 1622 else 1623 cat >>confdefs.h <<EOF 1624 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) 1625 EOF 1626 fi 1627 ;; 1628 scanf) #(vi 1629 if test "$cf_scanf_attribute" = no ; then 1630 cat >>confdefs.h <<EOF 1631 #define GCC_SCANFLIKE(fmt,var) /* nothing */ 1632 EOF 1633 else 1634 cat >>confdefs.h <<EOF 1635 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) 1636 EOF 1637 fi 1638 ;; 1639 esac 1431 1640 fi 1432 1641 done … … 1438 1647 ])dnl 1439 1648 dnl --------------------------------------------------------------------------- 1440 dnl CF_GCC_VERSION version: 4 updated: 2005/08/27 09:53:421649 dnl CF_GCC_VERSION version: 5 updated: 2010/04/24 11:02:31 1441 1650 dnl -------------- 1442 1651 dnl Find version of gcc … … 1446 1655 if test "$GCC" = yes ; then 1447 1656 AC_MSG_CHECKING(version of $CC) 1448 GCC_VERSION="`${CC} --version | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"1657 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" 1449 1658 test -z "$GCC_VERSION" && GCC_VERSION=unknown 1450 1659 AC_MSG_RESULT($GCC_VERSION) … … 1452 1661 ])dnl 1453 1662 dnl --------------------------------------------------------------------------- 1454 dnl CF_GCC_WARNINGS version: 2 3 updated: 2008/07/26 17:54:021663 dnl CF_GCC_WARNINGS version: 27 updated: 2010/10/23 15:52:32 1455 1664 dnl --------------- 1456 1665 dnl Check if the compiler supports useful warning options. There's a few that … … 1477 1686 1478 1687 cat > conftest.$ac_ext <<EOF 1479 #line __oline__ "${as_me -configure}"1688 #line __oline__ "${as_me:-configure}" 1480 1689 int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; } 1481 1690 EOF … … 1485 1694 # The "-wdXXX" options suppress warnings: 1486 1695 # remark #1419: external declaration in primary source file 1487 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)1488 1696 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem) 1489 1697 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem) … … 1493 1701 # remark #869: parameter "tw" was never referenced 1494 1702 # remark #981: operands are evaluated in unspecified order 1495 # warning #2 69: invalid format string conversion1703 # warning #279: controlling expression is constant 1496 1704 1497 1705 AC_CHECKING([for $CC warning options]) … … 1500 1708 for cf_opt in \ 1501 1709 wd1419 \ 1502 wd1682 \1503 1710 wd1683 \ 1504 1711 wd1684 \ 1505 1712 wd193 \ 1713 wd593 \ 1506 1714 wd279 \ 1507 wd593 \1508 1715 wd810 \ 1509 1716 wd869 \ … … 1522 1729 AC_CHECKING([for $CC warning options]) 1523 1730 cf_save_CFLAGS="$CFLAGS" 1524 EXTRA_CFLAGS= "-W -Wall"1731 EXTRA_CFLAGS= 1525 1732 cf_warn_CONST="" 1526 1733 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings" 1527 for cf_opt in \1734 for cf_opt in W Wall \ 1528 1735 Wbad-function-cast \ 1529 1736 Wcast-align \ … … 1558 1765 CFLAGS="$cf_save_CFLAGS" 1559 1766 fi 1560 rm - f conftest*1767 rm -rf conftest* 1561 1768 1562 1769 AC_SUBST(EXTRA_CFLAGS) 1563 1770 ])dnl 1564 1771 dnl --------------------------------------------------------------------------- 1565 dnl CF_GNAT_TRY_LINK version: 1 updated: 2004/08/21 19:02:08 1772 dnl CF_GNAT_GENERICS version: 2 updated: 2011/03/23 20:24:41 1773 dnl ---------------- 1774 AC_DEFUN([CF_GNAT_GENERICS], 1775 [ 1776 AC_REQUIRE([CF_GNAT_VERSION]) 1777 1778 AC_MSG_CHECKING(if GNAT supports generics) 1779 case $cf_gnat_version in #(vi 1780 3.[[1-9]]*|[[4-9]].*) #(vi 1781 cf_gnat_generics=yes 1782 ;; 1783 *) 1784 cf_gnat_generics=no 1785 ;; 1786 esac 1787 AC_MSG_RESULT($cf_gnat_generics) 1788 1789 if test "$cf_gnat_generics" = yes 1790 then 1791 cf_compile_generics=generics 1792 cf_generic_objects="\${GENOBJS}" 1793 else 1794 cf_compile_generics= 1795 cf_generic_objects= 1796 fi 1797 1798 AC_SUBST(cf_compile_generics) 1799 AC_SUBST(cf_generic_objects) 1800 ])dnl 1801 dnl --------------------------------------------------------------------------- 1802 dnl CF_GNAT_PRAGMA_UNREF version: 1 updated: 2010/06/19 15:22:18 1803 dnl -------------------- 1804 dnl Check if the gnat pragma "Unreferenced" works. 1805 AC_DEFUN([CF_GNAT_PRAGMA_UNREF],[ 1806 AC_CACHE_CHECK(if GNAT pragma Unreferenced works,cf_cv_pragma_unreferenced,[ 1807 CF_GNAT_TRY_LINK([procedure conftest;], 1808 [with Text_IO; 1809 with GNAT.OS_Lib; 1810 procedure conftest is 1811 test : Integer; 1812 pragma Unreferenced (test); 1813 begin 1814 test := 1; 1815 Text_IO.Put ("Hello World"); 1816 Text_IO.New_Line; 1817 GNAT.OS_Lib.OS_Exit (0); 1818 end conftest;], 1819 [cf_cv_pragma_unreferenced=yes], 1820 [cf_cv_pragma_unreferenced=no])]) 1821 1822 # if the pragma is supported, use it (needed in the Trace code). 1823 if test $cf_cv_pragma_unreferenced = yes ; then 1824 PRAGMA_UNREF=TRUE 1825 else 1826 PRAGMA_UNREF=FALSE 1827 fi 1828 AC_SUBST(PRAGMA_UNREF) 1829 ])dnl 1830 dnl --------------------------------------------------------------------------- 1831 dnl CF_GNAT_PROJECTS version: 2 updated: 2011/03/23 20:24:41 1832 dnl ---------------- 1833 dnl GNAT projects are configured with ".gpr" project files. 1834 dnl GNAT libraries are a further development, using the project feature. 1835 AC_DEFUN([CF_GNAT_PROJECTS], 1836 [ 1837 AC_REQUIRE([CF_GNAT_VERSION]) 1838 1839 cf_gnat_libraries=no 1840 cf_gnat_projects=no 1841 1842 AC_MSG_CHECKING(if GNAT supports project files) 1843 case $cf_gnat_version in #(vi 1844 3.[[0-9]]*) #(vi 1845 ;; 1846 *) 1847 case $cf_cv_system_name in #(vi 1848 cygwin*) #(vi 1849 ;; 1850 *) 1851 mkdir conftest.src conftest.bin conftest.lib 1852 cd conftest.src 1853 rm -rf conftest* *~conftest* 1854 cat >>library.gpr <<CF_EOF 1855 project Library is 1856 Kind := External ("LIB_KIND"); 1857 for Library_Name use "ConfTest"; 1858 for Object_Dir use "."; 1859 for Library_ALI_Dir use External("LIBRARY_DIR"); 1860 for Library_Version use External ("SONAME"); 1861 for Library_Kind use Kind; 1862 for Library_Dir use External("BUILD_DIR"); 1863 Source_Dir := External ("SOURCE_DIR"); 1864 for Source_Dirs use (Source_Dir); 1865 package Compiler is 1866 for Default_Switches ("Ada") use 1867 ("-g", 1868 "-O2", 1869 "-gnatafno", 1870 "-gnatVa", -- All validity checks 1871 "-gnatwa"); -- Activate all optional errors 1872 end Compiler; 1873 end Library; 1874 CF_EOF 1875 cat >>confpackage.ads <<CF_EOF 1876 package ConfPackage is 1877 procedure conftest; 1878 end ConfPackage; 1879 CF_EOF 1880 cat >>confpackage.adb <<CF_EOF 1881 with Text_IO; 1882 package body ConfPackage is 1883 procedure conftest is 1884 begin 1885 Text_IO.Put ("Hello World"); 1886 Text_IO.New_Line; 1887 end conftest; 1888 end ConfPackage; 1889 CF_EOF 1890 if ( $cf_ada_make $ADAFLAGS \ 1891 -Plibrary.gpr \ 1892 -XBUILD_DIR=`cd ../conftest.bin;pwd` \ 1893 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \ 1894 -XSOURCE_DIR=`pwd` \ 1895 -XSONAME=libConfTest.so.1 \ 1896 -XLIB_KIND=static 1>&AC_FD_CC 2>&1 ) ; then 1897 cf_gnat_projects=yes 1898 fi 1899 cd .. 1900 if test -f conftest.lib/confpackage.ali 1901 then 1902 cf_gnat_libraries=yes 1903 fi 1904 rm -rf conftest* *~conftest* 1905 ;; 1906 esac 1907 ;; 1908 esac 1909 AC_MSG_RESULT($cf_gnat_projects) 1910 1911 if test $cf_gnat_projects = yes 1912 then 1913 AC_MSG_CHECKING(if GNAT supports libraries) 1914 AC_MSG_RESULT($cf_gnat_libraries) 1915 fi 1916 1917 if test "$cf_gnat_projects" = yes 1918 then 1919 USE_OLD_MAKERULES="#" 1920 USE_GNAT_PROJECTS="" 1921 else 1922 USE_OLD_MAKERULES="" 1923 USE_GNAT_PROJECTS="#" 1924 fi 1925 1926 if test "$cf_gnat_libraries" = yes 1927 then 1928 USE_GNAT_LIBRARIES="" 1929 else 1930 USE_GNAT_LIBRARIES="#" 1931 fi 1932 1933 AC_SUBST(USE_OLD_MAKERULES) 1934 AC_SUBST(USE_GNAT_PROJECTS) 1935 AC_SUBST(USE_GNAT_LIBRARIES) 1936 ])dnl 1937 dnl --------------------------------------------------------------------------- 1938 dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59 1939 dnl -------------- 1940 dnl Check if gnat supports SIGINT, and presumably tasking. For the latter, it 1941 dnl is noted that gnat may compile a tasking unit even for configurations which 1942 dnl fail at runtime. 1943 AC_DEFUN([CF_GNAT_SIGINT],[ 1944 AC_CACHE_CHECK(if GNAT supports SIGINT,cf_cv_gnat_sigint,[ 1945 CF_GNAT_TRY_LINK([with Ada.Interrupts.Names; 1946 1947 package ConfTest is 1948 1949 pragma Warnings (Off); -- the next pragma exists since 3.11p 1950 pragma Unreserve_All_Interrupts; 1951 pragma Warnings (On); 1952 1953 protected Process is 1954 procedure Stop; 1955 function Continue return Boolean; 1956 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT); 1957 private 1958 Done : Boolean := False; 1959 end Process; 1960 1961 end ConfTest;], 1962 [package body ConfTest is 1963 protected body Process is 1964 procedure Stop is 1965 begin 1966 Done := True; 1967 end Stop; 1968 function Continue return Boolean is 1969 begin 1970 return not Done; 1971 end Continue; 1972 end Process; 1973 end ConfTest;], 1974 [cf_cv_gnat_sigint=yes], 1975 [cf_cv_gnat_sigint=no])]) 1976 1977 if test $cf_cv_gnat_sigint = yes ; then 1978 USE_GNAT_SIGINT="" 1979 else 1980 USE_GNAT_SIGINT="#" 1981 fi 1982 AC_SUBST(USE_GNAT_SIGINT) 1983 ])dnl 1984 dnl --------------------------------------------------------------------------- 1985 dnl CF_GNAT_TRY_LINK version: 3 updated: 2011/03/19 14:47:45 1566 1986 dnl ---------------- 1567 1987 dnl Verify that a test program compiles/links with GNAT. … … 1575 1995 AC_DEFUN([CF_GNAT_TRY_LINK], 1576 1996 [ 1577 rm - fconftest*1997 rm -rf conftest* *~conftest* 1578 1998 cat >>conftest.ads <<CF_EOF 1579 1999 $1 … … 1587 2007 $4]) 1588 2008 fi 1589 rm - fconftest*1590 ])dnl 1591 dnl --------------------------------------------------------------------------- 1592 dnl CF_GNAT_TRY_RUN version: 3 updated: 2004/08/21 19:02:082009 rm -rf conftest* *~conftest* 2010 ])dnl 2011 dnl --------------------------------------------------------------------------- 2012 dnl CF_GNAT_TRY_RUN version: 5 updated: 2011/03/19 14:47:45 1593 2013 dnl --------------- 1594 2014 dnl Verify that a test program compiles and runs with GNAT … … 1602 2022 AC_DEFUN([CF_GNAT_TRY_RUN], 1603 2023 [ 1604 rm - fconftest*2024 rm -rf conftest* *~conftest* 1605 2025 cat >>conftest.ads <<CF_EOF 1606 2026 $1 … … 1618 2038 $4]) 1619 2039 fi 1620 rm - fconftest*1621 ])dnl 1622 dnl --------------------------------------------------------------------------- 1623 dnl CF_GNAT_VERSION version: 1 2 updated: 2006/10/14 15:23:152040 rm -rf conftest* *~conftest* 2041 ])dnl 2042 dnl --------------------------------------------------------------------------- 2043 dnl CF_GNAT_VERSION version: 17 updated: 2011/03/23 20:24:41 1624 2044 dnl --------------- 1625 2045 dnl Verify version of GNAT. … … 1627 2047 [ 1628 2048 AC_MSG_CHECKING(for gnat version) 1629 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[[0-9]].[[0-9]][[0-9]]*' |\ 1630 sed -e '2,$d' -e 's/[[^0-9 \.]]//g' -e 's/^[[ ]]*//' -e 's/ .*//'` 2049 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \ 2050 grep '[[0-9]].[[0-9]][[0-9]]*' |\ 2051 sed -e '2,$d' -e 's/[[^0-9 \.]]//g' -e 's/^[[ ]]*//' -e 's/ .*//'` 1631 2052 AC_MSG_RESULT($cf_gnat_version) 1632 2053 1633 case $cf_gnat_version in 1634 3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*) 1635 cf_cv_prog_gnat_correct=yes 1636 ;; 1637 *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding. 1638 cf_cv_prog_gnat_correct=no 1639 ;; 1640 esac 1641 case $cf_gnat_version in 1642 3.[[1-9]]*|[[4-9]].*) 1643 cf_compile_generics=generics 1644 cf_generic_objects="\${GENOBJS}" 1645 ;; 1646 *) cf_compile_generics= 1647 cf_generic_objects= 1648 ;; 2054 case $cf_gnat_version in #(vi 2055 3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*) #(vi 2056 cf_cv_prog_gnat_correct=yes 2057 ;; 2058 *) 2059 AC_MSG_WARN(Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding.) 2060 cf_cv_prog_gnat_correct=no 2061 ;; 1649 2062 esac 1650 2063 ]) … … 1680 2093 ])dnl 1681 2094 dnl --------------------------------------------------------------------------- 1682 dnl CF_GPP_LIBRARY version: 8 updated: 2003/02/02 01:41:462095 dnl CF_GPP_LIBRARY version: 10 updated: 2010/05/29 16:31:02 1683 2096 dnl -------------- 1684 2097 dnl If we're trying to use g++, test if libg++ is installed (a rather common … … 1699 2112 AC_MSG_CHECKING([for lib$cf_gpp_libname]) 1700 2113 cf_save="$LIBS" 1701 LIBS="$LIBS -l$cf_gpp_libname"2114 CF_ADD_LIB($cf_gpp_libname) 1702 2115 AC_TRY_LINK([ 1703 2116 #include <$cf_gpp_libname/builtin.h> … … 1705 2118 [two_arg_error_handler_t foo2 = lib_error_handler], 1706 2119 [cf_cxx_library=yes 1707 C XXLIBS="$CXXLIBS -l$cf_gpp_libname"2120 CF_ADD_LIB($cf_gpp_libname,CXXLIBS) 1708 2121 if test "$cf_gpp_libname" = cpp ; then 1709 2122 AC_DEFINE(HAVE_GPP_BUILTIN_H) … … 1716 2129 [two_arg_error_handler_t foo2 = lib_error_handler], 1717 2130 [cf_cxx_library=yes 1718 C XXLIBS="$CXXLIBS -l$cf_gpp_libname"2131 CF_ADD_LIB($cf_gpp_libname,CXXLIBS) 1719 2132 AC_DEFINE(HAVE_BUILTIN_H)], 1720 2133 [cf_cxx_library=no])]) … … 1724 2137 ])dnl 1725 2138 dnl --------------------------------------------------------------------------- 1726 dnl CF_GXX_VERSION version: 5 updated: 2005/08/27 09:53:422139 dnl CF_GXX_VERSION version: 6 updated: 2010/10/23 15:44:18 1727 2140 dnl -------------- 1728 2141 dnl Check for version of g++ … … 1732 2145 if test "$GXX" = yes; then 1733 2146 AC_MSG_CHECKING(version of g++) 1734 GXX_VERSION="`${CXX -g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"2147 GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" 1735 2148 test -z "$GXX_VERSION" && GXX_VERSION=unknown 1736 2149 AC_MSG_RESULT($GXX_VERSION) … … 1738 2151 ])dnl 1739 2152 dnl --------------------------------------------------------------------------- 1740 dnl CF_GXX_WARNINGS version: 5 updated: 2005/08/13 14:54:382153 dnl CF_GXX_WARNINGS version: 6 updated: 2010/08/14 18:25:37 1741 2154 dnl --------------- 1742 2155 dnl Check if the compiler supports useful warning options. … … 1849 2262 fi 1850 2263 1851 rm - f conftest*2264 rm -rf conftest* 1852 2265 AC_LANG_RESTORE 1853 2266 AC_SUBST(EXTRA_CXXFLAGS) 1854 2267 ])dnl 1855 2268 dnl --------------------------------------------------------------------------- 1856 dnl CF_HASHED_DB version: 3 updated: 2007/11/24 17:43:372269 dnl CF_HASHED_DB version: 4 updated: 2010/05/29 16:31:02 1857 2270 dnl ------------ 1858 2271 dnl Look for an instance of the Berkeley hashed database. … … 1881 2294 AC_MSG_ERROR(Cannot determine library for db) 1882 2295 elif test "$cf_cv_hashed_db_libs" != default ; then 1883 LIBS="-l$cf_cv_hashed_db_libs $LIBS"2296 CF_ADD_LIB($cf_cv_hashed_db_libs) 1884 2297 fi 1885 2298 fi … … 1889 2302 ])dnl 1890 2303 dnl --------------------------------------------------------------------------- 1891 dnl CF_HASHED_DB_LIBS version: 8 updated: 2008/08/04 06:18:062304 dnl CF_HASHED_DB_LIBS version: 9 updated: 2010/05/29 16:31:02 1892 2305 dnl ----------------- 1893 2306 dnl Given that we have the header and version for hashed database, find the … … 1901 2314 cf_save_libs="$LIBS" 1902 2315 if test -n "$cf_db_libs"; then 1903 LIBS="-l$cf_db_libs $LIBS"2316 CF_ADD_LIB($cf_db_libs) 1904 2317 fi 1905 2318 CF_MSG_LOG(checking for library "$cf_db_libs") … … 1999 2412 ])dnl 2000 2413 dnl --------------------------------------------------------------------------- 2001 dnl CF_HEADER_PATH version: 8 updated: 2002/11/10 14:46:592414 dnl CF_HEADER_PATH version: 12 updated: 2010/05/05 05:22:40 2002 2415 dnl -------------- 2003 dnl Construct a search-list for a nonstandard header-file 2416 dnl Construct a search-list of directories for a nonstandard header-file 2417 dnl 2418 dnl Parameters 2419 dnl $1 = the variable to return as result 2420 dnl $2 = the package name 2004 2421 AC_DEFUN([CF_HEADER_PATH], 2005 [CF_SUBDIR_PATH($1,$2,include) 2422 [ 2423 $1= 2424 2425 # collect the current set of include-directories from compiler flags 2426 cf_header_path_list="" 2427 if test -n "${CFLAGS}${CPPFLAGS}" ; then 2428 for cf_header_path in $CPPFLAGS $CFLAGS 2429 do 2430 case $cf_header_path in #(vi 2431 -I*) 2432 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'` 2433 CF_ADD_SUBDIR_PATH($1,$2,include,$cf_header_path,NONE) 2434 cf_header_path_list="$cf_header_path_list [$]$1" 2435 ;; 2436 esac 2437 done 2438 fi 2439 2440 # add the variations for the package we are looking for 2441 CF_SUBDIR_PATH($1,$2,include) 2442 2006 2443 test "$includedir" != NONE && \ 2007 2444 test "$includedir" != "/usr/include" && \ … … 2018 2455 } 2019 2456 2457 $1="[$]$1 $cf_header_path_list" 2020 2458 ])dnl 2021 2459 dnl --------------------------------------------------------------------------- … … 2027 2465 ])dnl 2028 2466 dnl --------------------------------------------------------------------------- 2029 dnl CF_INCLUDE_DIRS version: 5 updated: 2006/10/14 15:23:152467 dnl CF_INCLUDE_DIRS version: 6 updated: 2009/01/06 19:37:40 2030 2468 dnl --------------- 2031 2469 dnl Construct the list of include-options according to whether we're building … … 2035 2473 AC_DEFUN([CF_INCLUDE_DIRS], 2036 2474 [ 2037 CPPFLAGS=" -I. -I../include $CPPFLAGS"2475 CPPFLAGS="$CPPFLAGS -I. -I../include" 2038 2476 if test "$srcdir" != "."; then 2039 CPPFLAGS=" -I\${srcdir}/../include $CPPFLAGS"2477 CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include" 2040 2478 fi 2041 2479 if test "$GCC" != yes; then … … 2053 2491 ])dnl 2054 2492 dnl --------------------------------------------------------------------------- 2055 dnl CF_INTEL_COMPILER version: 3 updated: 2005/08/06 18:37:292493 dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42 2056 2494 dnl ----------------- 2057 2495 dnl Check if the given compiler is really the Intel compiler for Linux. It … … 2067 2505 dnl $3 = CFLAGS (default) or CXXFLAGS 2068 2506 AC_DEFUN([CF_INTEL_COMPILER],[ 2069 ifelse( $2,,INTEL_COMPILER,[$2])=no2070 2071 if test "$ifelse( $1,,[$1],GCC)" = yes ; then2507 ifelse([$2],,INTEL_COMPILER,[$2])=no 2508 2509 if test "$ifelse([$1],,[$1],GCC)" = yes ; then 2072 2510 case $host_os in 2073 2511 linux*|gnu*) 2074 AC_MSG_CHECKING(if this is really Intel ifelse( $1,GXX,C++,C) compiler)2075 cf_save_CFLAGS="$ifelse( $3,,CFLAGS,[$3])"2076 ifelse( $3,,CFLAGS,[$3])="$ifelse($3,,CFLAGS,[$3]) -no-gcc"2512 AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler) 2513 cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])" 2514 ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc" 2077 2515 AC_TRY_COMPILE([],[ 2078 2516 #ifdef __INTEL_COMPILER … … 2080 2518 make an error 2081 2519 #endif 2082 ],[ifelse( $2,,INTEL_COMPILER,[$2])=yes2520 ],[ifelse([$2],,INTEL_COMPILER,[$2])=yes 2083 2521 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc" 2084 2522 ],[]) 2085 ifelse( $3,,CFLAGS,[$3])="$cf_save_CFLAGS"2086 AC_MSG_RESULT($ifelse( $2,,INTEL_COMPILER,[$2]))2523 ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS" 2524 AC_MSG_RESULT($ifelse([$2],,INTEL_COMPILER,[$2])) 2087 2525 ;; 2088 2526 esac … … 2144 2582 ]) 2145 2583 dnl --------------------------------------------------------------------------- 2146 dnl CF_LDFLAGS_STATIC version: 4 updated: 2008/10/18 17:58:202584 dnl CF_LDFLAGS_STATIC version: 8 updated: 2010/10/23 14:39:56 2147 2585 dnl ----------------- 2148 2586 dnl Check for compiler/linker flags used to temporarily force usage of static … … 2154 2592 if test "$GCC" = yes ; then 2155 2593 case $cf_cv_system_name in #( 2156 OS/2*|os2*|aix[[4 5]]*) #( vi2594 OS/2*|os2*|aix[[4]]*|solaris2.1[[0-9]]|darwin*) #( vi 2157 2595 LDFLAGS_STATIC= 2158 2596 LDFLAGS_SHARED= … … 2165 2603 else 2166 2604 case $cf_cv_system_name in #( 2167 aix[[45 ]]*) #( from ld manpage2605 aix[[456]]*) #( from ld manpage 2168 2606 LDFLAGS_STATIC=-bstatic 2169 2607 LDFLAGS_SHARED=-bdynamic … … 2180 2618 osf[[45]]*) #( from ld manpage osf4.0d, osf5.1 2181 2619 # alternative "-oldstyle_liblookup" (not in cc manpage) 2182 LDFLAGS_STATIC=-noso 2620 LDFLAGS_STATIC=-noso 2183 2621 LDFLAGS_SHARED=-so_archive 2184 2622 ;; … … 2190 2628 fi 2191 2629 2630 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED" 2631 then 2632 AC_MSG_CHECKING(if linker supports switching between static/dynamic) 2633 2634 rm -f libconftest.a 2635 cat >conftest.$ac_ext <<EOF 2636 #line __oline__ "configure" 2637 #include <stdio.h> 2638 int cf_ldflags_static(FILE *fp) { return fflush(fp); } 2639 EOF 2640 if AC_TRY_EVAL(ac_compile) ; then 2641 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&AC_FD_CC 1>/dev/null 2642 ( eval $RANLIB libconftest.a ) 2>&AC_FD_CC >/dev/null 2643 fi 2644 rm -f conftest.* 2645 2646 cf_save_LIBS="$LIBS" 2647 2648 LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS" 2649 AC_TRY_LINK([ 2650 #line __oline__ "configure" 2651 #include <stdio.h> 2652 int cf_ldflags_static(FILE *fp); 2653 ],[ 2654 return cf_ldflags_static(stdin); 2655 ],[cf_ldflags_static=yes],[cf_ldflags_static=no]) 2656 2657 rm -f libconftest.* 2658 LIBS="$cf_save_LIBS" 2659 2660 AC_MSG_RESULT($cf_ldflags_static) 2661 2662 if test $cf_ldflags_static != yes 2663 then 2664 LDFLAGS_STATIC= 2665 LDFLAGS_SHARED= 2666 fi 2667 else 2668 LDFLAGS_STATIC= 2669 LDFLAGS_SHARED= 2670 fi 2671 2192 2672 AC_SUBST(LDFLAGS_STATIC) 2193 2673 AC_SUBST(LDFLAGS_SHARED) 2194 2674 ]) 2195 2675 dnl --------------------------------------------------------------------------- 2196 dnl CF_L IBRARY_PATH version: 7 updated: 2002/11/10 14:46:592676 dnl CF_LD_RPATH_OPT version: 3 updated: 2010/06/02 05:03:05 2197 2677 dnl --------------- 2198 dnl Construct a search-list for a nonstandard library-file 2678 dnl For the given system and compiler, find the compiler flags to pass to the 2679 dnl loader to use the "rpath" feature. 2680 AC_DEFUN([CF_LD_RPATH_OPT], 2681 [ 2682 AC_REQUIRE([CF_CHECK_CACHE]) 2683 2684 LD_RPATH_OPT= 2685 AC_MSG_CHECKING(for an rpath option) 2686 case $cf_cv_system_name in #(vi 2687 irix*) #(vi 2688 if test "$GCC" = yes; then 2689 LD_RPATH_OPT="-Wl,-rpath," 2690 else 2691 LD_RPATH_OPT="-rpath " 2692 fi 2693 ;; 2694 linux*|gnu*|k*bsd*-gnu) #(vi 2695 LD_RPATH_OPT="-Wl,-rpath," 2696 ;; 2697 openbsd[[2-9]].*) #(vi 2698 LD_RPATH_OPT="-Wl,-rpath," 2699 ;; 2700 freebsd*) #(vi 2701 LD_RPATH_OPT="-rpath " 2702 ;; 2703 netbsd*) #(vi 2704 LD_RPATH_OPT="-Wl,-rpath," 2705 ;; 2706 osf*|mls+*) #(vi 2707 LD_RPATH_OPT="-rpath " 2708 ;; 2709 solaris2*) #(vi 2710 LD_RPATH_OPT="-R" 2711 ;; 2712 *) 2713 ;; 2714 esac 2715 AC_MSG_RESULT($LD_RPATH_OPT) 2716 2717 case "x$LD_RPATH_OPT" in #(vi 2718 x-R*) 2719 AC_MSG_CHECKING(if we need a space after rpath option) 2720 cf_save_LIBS="$LIBS" 2721 CF_ADD_LIBS(${LD_RPATH_OPT}$libdir) 2722 AC_TRY_LINK(, , cf_rpath_space=no, cf_rpath_space=yes) 2723 LIBS="$cf_save_LIBS" 2724 AC_MSG_RESULT($cf_rpath_space) 2725 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT " 2726 ;; 2727 esac 2728 ])dnl 2729 dnl --------------------------------------------------------------------------- 2730 dnl CF_LIBRARY_PATH version: 9 updated: 2010/03/28 12:52:50 2731 dnl --------------- 2732 dnl Construct a search-list of directories for a nonstandard library-file 2733 dnl 2734 dnl Parameters 2735 dnl $1 = the variable to return as result 2736 dnl $2 = the package name 2199 2737 AC_DEFUN([CF_LIBRARY_PATH], 2200 [CF_SUBDIR_PATH($1,$2,lib)])dnl 2738 [ 2739 $1= 2740 cf_library_path_list="" 2741 if test -n "${LDFLAGS}${LIBS}" ; then 2742 for cf_library_path in $LDFLAGS $LIBS 2743 do 2744 case $cf_library_path in #(vi 2745 -L*) 2746 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'` 2747 CF_ADD_SUBDIR_PATH($1,$2,lib,$cf_library_path,NONE) 2748 cf_library_path_list="$cf_library_path_list [$]$1" 2749 ;; 2750 esac 2751 done 2752 fi 2753 2754 CF_SUBDIR_PATH($1,$2,lib) 2755 2756 $1="$cf_library_path_list [$]$1" 2757 ])dnl 2201 2758 dnl --------------------------------------------------------------------------- 2202 2759 dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16 … … 2217 2774 ])dnl 2218 2775 dnl --------------------------------------------------------------------------- 2219 dnl CF_LIB_RULES version: 53 updated: 2008/09/20 19:51:592776 dnl CF_LIB_RULES version: 61 updated: 2010/10/23 16:10:30 2220 2777 dnl ------------ 2221 2778 dnl Append definitions and rules for the given models to the subdirectory … … 2238 2795 TINFO_NAME=$TINFO_ARG_SUFFIX 2239 2796 TINFO_SUFFIX=.dll 2797 fi 2798 2799 if test -n "$TINFO_SUFFIX" ; then 2800 case $TINFO_SUFFIX in 2801 tw*) 2802 TINFO_NAME="${TINFO_NAME}tw" 2803 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'` 2804 ;; 2805 t*) 2806 TINFO_NAME="${TINFO_NAME}t" 2807 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'` 2808 ;; 2809 w*) 2810 TINFO_NAME="${TINFO_NAME}w" 2811 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'` 2812 ;; 2813 esac 2240 2814 fi 2241 2815 … … 2258 2832 darwin*) 2259 2833 case .${LIB_SUFFIX} in 2834 .tw*) 2835 cf_suffix=`echo $cf_suffix | sed 's/^tw//'` 2836 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix" 2837 ;; 2838 .t*) 2839 cf_suffix=`echo $cf_suffix | sed 's/^t//'` 2840 cf_suffix=t'.${REL_VERSION}'"$cf_suffix" 2841 ;; 2260 2842 .w*) 2261 2843 cf_suffix=`echo $cf_suffix | sed 's/^w//'` … … 2274 2856 darwin*) 2275 2857 case .${LIB_SUFFIX} in 2858 .tw*) 2859 cf_suffix=`echo $cf_suffix | sed 's/^tw//'` 2860 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix" 2861 ;; 2862 .t*) 2863 cf_suffix=`echo $cf_suffix | sed 's/^t//'` 2864 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix" 2865 ;; 2276 2866 .w*) 2277 2867 cf_suffix=`echo $cf_suffix | sed 's/^w//'` … … 2394 2984 if test -n "$LIB_SUFFIX" ; then 2395 2985 case $LIB_SUFFIX in 2986 tw*) 2987 cf_libname=`echo $cf_libname | sed 's/tw$//'` 2988 cf_suffix=`echo $cf_suffix | sed 's/^tw//'` 2989 cf_dir_suffix=tw 2990 ;; 2991 t*) 2992 cf_libname=`echo $cf_libname | sed 's/t$//'` 2993 cf_suffix=`echo $cf_suffix | sed 's/^t//'` 2994 cf_dir_suffix=t 2995 ;; 2396 2996 w*) 2397 2997 cf_libname=`echo $cf_libname | sed 's/w$//'` … … 2411 3011 suffix=$cf_suffix \ 2412 3012 subset=$cf_subset \ 3013 SymLink="$LN_S" \ 2413 3014 TermlibRoot=$TINFO_NAME \ 2414 3015 TermlibSuffix=$TINFO_SUFFIX \ 2415 3016 ShlibVer=$cf_cv_shlib_version \ 2416 3017 ShlibVerInfix=$cf_cv_shlib_version_infix \ 2417 ReLink=${cf_cv_do_relink -no} \3018 ReLink=${cf_cv_do_relink:-no} \ 2418 3019 DoLinks=$cf_cv_do_symlinks \ 2419 3020 rmSoLocs=$cf_cv_rm_so_locs \ … … 2422 3023 depend="$cf_depend" \ 2423 3024 host="$host" \ 3025 libtool_version="$LIBTOOL_VERSION" \ 2424 3026 $srcdir/$cf_dir/modules >>$cf_dir/Makefile 2425 3027 … … 2505 3107 install.data uninstall.data :: 2506 3108 $MAKE_TERMINFO cd misc && \${MAKE} \${CF_MFLAGS} \[$]@ 3109 CF_EOF 3110 3111 if test "x$cf_with_manpages" = xyes; then 3112 cat >> Makefile <<CF_EOF 2507 3113 2508 3114 install.man \\ 2509 3115 uninstall.man :: 2510 3116 cd man && \${MAKE} \${CF_MFLAGS} \[$]@ 3117 CF_EOF 3118 fi 3119 3120 cat >> Makefile <<CF_EOF 2511 3121 2512 3122 distclean :: 2513 3123 rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h 2514 3124 rm -f headers.sh headers.sed mk_shared_lib.sh 3125 rm -f edit_man.* man_alias.* 2515 3126 rm -rf \${DIRS_TO_MAKE} 2516 3127 CF_EOF 2517 3128 2518 3129 # Special case: tack's manpage lives in its own directory. 3130 if test "x$cf_with_manpages" = xyes; then 2519 3131 if test -d tack ; then 2520 3132 if test -f $srcdir/$tack.h; then … … 2525 3137 cd tack && \${MAKE} \${CF_MFLAGS} \[$]@ 2526 3138 CF_EOF 3139 fi 2527 3140 fi 2528 3141 fi … … 2552 3165 REF=\[$]2 2553 3166 SRC=\[$]3 2554 TMPSRC=\${TMPDIR -/tmp}/\`basename \$SRC\`\$\$2555 TMPSED=\${TMPDIR -/tmp}/headers.sed\$\$3167 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$ 3168 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$ 2556 3169 echo installing \$SRC in \$DST 2557 3170 CF_EOF … … 2640 3253 fi 2641 3254 done 2642 2643 ])dnl 2644 dnl --------------------------------------------------------------------------- 2645 dnl CF_LIB_SONAME version: 3 updated: 2006/12/16 15:55:463255 AC_SUBST(LIBS_TO_MAKE) 3256 ])dnl 3257 dnl --------------------------------------------------------------------------- 3258 dnl CF_LIB_SONAME version: 5 updated: 2010/08/14 18:25:37 2646 3259 dnl ------------- 2647 3260 dnl Find the and soname for the given shared library. Set the cache variable … … 2667 3280 CF_EOF 2668 3281 cf_save_LIBS="$LIBS" 2669 LIBS="-l$3 $LIBS"3282 CF_ADD_LIB($3) 2670 3283 if AC_TRY_EVAL(ac_compile) ; then 2671 3284 if AC_TRY_EVAL(ac_link) ; then … … 2674 3287 fi 2675 3288 fi 2676 rm - f conftest*3289 rm -rf conftest* 2677 3290 LIBS="$cf_save_LIBS" 2678 3291 fi … … 2680 3293 ]) 2681 3294 dnl --------------------------------------------------------------------------- 2682 dnl CF_LIB_SUFFIX version: 1 5 updated: 2008/09/13 11:54:483295 dnl CF_LIB_SUFFIX version: 16 updated: 2008/12/27 12:30:03 2683 3296 dnl ------------- 2684 3297 dnl Compute the library file-suffix from the given model name … … 2690 3303 [ 2691 3304 AC_REQUIRE([CF_SUBST_NCURSES_VERSION]) 2692 case $1 in 2693 libtool) 3305 case $1 in #(vi 3306 libtool) #(vi 2694 3307 $2='.la' 2695 3308 $3=[$]$2 2696 3309 ;; 2697 normal) 3310 normal) #(vi 2698 3311 $2='.a' 2699 3312 $3=[$]$2 2700 3313 ;; 2701 debug) 3314 debug) #(vi 2702 3315 $2='_g.a' 2703 3316 $3=[$]$2 2704 3317 ;; 2705 profile) 3318 profile) #(vi 2706 3319 $2='_p.a' 2707 3320 $3=[$]$2 2708 3321 ;; 2709 shared) 3322 shared) #(vi 2710 3323 case $cf_cv_system_name in 2711 cygwin*) 3324 aix[[56]]*) #(vi 3325 $2='.a' 3326 $3=[$]$2 3327 ;; 3328 cygwin*) #(vi 2712 3329 $2='.dll' 2713 3330 $3='.dll.a' 2714 3331 ;; 2715 darwin*) 3332 darwin*) #(vi 2716 3333 $2='.dylib' 2717 3334 $3=[$]$2 2718 3335 ;; 2719 hpux*) 3336 hpux*) #(vi 2720 3337 case $target in 2721 ia64*) 3338 ia64*) #(vi 2722 3339 $2='.so' 2723 3340 $3=[$]$2 2724 3341 ;; 2725 *) 3342 *) #(vi 2726 3343 $2='.sl' 2727 3344 $3=[$]$2 … … 2756 3373 ])dnl 2757 3374 dnl --------------------------------------------------------------------------- 2758 dnl CF_LINK_DATAONLY version: 8 updated: 2006/12/16 12:33:303375 dnl CF_LINK_DATAONLY version: 9 updated: 2009/01/01 20:21:38 2759 3376 dnl ---------------- 2760 3377 dnl Some systems have a non-ANSI linker that doesn't pull in modules that have … … 2773 3390 if AC_TRY_EVAL(ac_compile) ; then 2774 3391 mv conftest.o data.o && \ 2775 ( $AR $AR _OPTS conftest.a data.o ) 2>&AC_FD_CC 1>/dev/null3392 ( $AR $ARFLAGS conftest.a data.o ) 2>&AC_FD_CC 1>/dev/null 2776 3393 fi 2777 3394 rm -f conftest.$ac_ext data.o … … 2792 3409 if AC_TRY_EVAL(ac_compile); then 2793 3410 mv conftest.o func.o && \ 2794 ( $AR $AR _OPTS conftest.a func.o ) 2>&AC_FD_CC 1>/dev/null3411 ( $AR $ARFLAGS conftest.a func.o ) 2>&AC_FD_CC 1>/dev/null 2795 3412 fi 2796 3413 rm -f conftest.$ac_ext func.o … … 2888 3505 ])dnl 2889 3506 dnl --------------------------------------------------------------------------- 2890 dnl CF_MAKEFLAGS version: 1 2 updated: 2006/10/21 08:27:033507 dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46 2891 3508 dnl ------------ 2892 3509 dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make' … … 2905 3522 @ echo '.$cf_option' 2906 3523 CF_EOF 2907 cf_result=`${MAKE -make} -k -f cf_makeflags.tmp 2>/dev/null| sed -e 's,[[ ]]*$,,'`3524 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[[ ]]*$,,'` 2908 3525 case "$cf_result" in 2909 3526 .*k) 2910 cf_result=`${MAKE -make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`3527 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` 2911 3528 case "$cf_result" in 2912 3529 .*CC=*) cf_cv_makeflags= … … 2928 3545 ])dnl 2929 3546 dnl --------------------------------------------------------------------------- 2930 dnl CF_MAKE_TAGS version: 2 updated: 2000/10/04 09:18:403547 dnl CF_MAKE_TAGS version: 6 updated: 2010/10/23 15:52:32 2931 3548 dnl ------------ 2932 3549 dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have … … 2934 3551 AC_DEFUN([CF_MAKE_TAGS],[ 2935 3552 AC_REQUIRE([CF_MIXEDCASE_FILENAMES]) 2936 AC_CHECK_PROG(MAKE_LOWER_TAGS, ctags, yes, no) 3553 3554 AC_CHECK_PROGS(CTAGS, exctags ctags) 3555 AC_CHECK_PROGS(ETAGS, exetags etags) 3556 3557 AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS:-ctags}, yes, no) 2937 3558 2938 3559 if test "$cf_cv_mixedcase" = yes ; then 2939 AC_CHECK_PROG(MAKE_UPPER_TAGS, etags, yes, no)3560 AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS:-etags}, yes, no) 2940 3561 else 2941 3562 MAKE_UPPER_TAGS=no … … 2947 3568 MAKE_UPPER_TAGS="#" 2948 3569 fi 2949 AC_SUBST(MAKE_UPPER_TAGS)2950 3570 2951 3571 if test "$MAKE_LOWER_TAGS" = yes ; then … … 2954 3574 MAKE_LOWER_TAGS="#" 2955 3575 fi 3576 3577 AC_SUBST(CTAGS) 3578 AC_SUBST(ETAGS) 3579 3580 AC_SUBST(MAKE_UPPER_TAGS) 2956 3581 AC_SUBST(MAKE_LOWER_TAGS) 2957 3582 ])dnl 2958 3583 dnl --------------------------------------------------------------------------- 2959 dnl CF_MANPAGE_FORMAT version: 7 updated: 2003/12/20 19:30:343584 dnl CF_MANPAGE_FORMAT version: 9 updated: 2010/10/23 16:10:30 2960 3585 dnl ----------------- 2961 3586 dnl Option to allow user to override automatic configuration of manpage format. … … 2999 3624 cf_example=date 3000 3625 3001 IFS="${IFS = }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"3626 IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" 3002 3627 for cf_dir in $MANPATH; do 3003 3628 test -z "$cf_dir" && cf_dir=/usr/man … … 3113 3738 ])dnl 3114 3739 dnl --------------------------------------------------------------------------- 3115 dnl CF_MANPAGE_SYMLINKS version: 4 updated: 2003/12/13 18:01:583740 dnl CF_MANPAGE_SYMLINKS version: 5 updated: 2010/07/24 17:12:40 3116 3741 dnl ------------------- 3117 3742 dnl Some people expect each tool to make all aliases for manpages in the … … 3129 3754 AC_MSG_RESULT($MANPAGE_ALIASES) 3130 3755 3131 if test "$LN_S" = "ln -s"; then 3756 case "x$LN_S" in #(vi 3757 xln*) #(vi 3132 3758 cf_use_symlinks=yes 3133 else 3759 ;; 3760 *) 3134 3761 cf_use_symlinks=no 3135 fi 3762 ;; 3763 esac 3136 3764 3137 3765 MANPAGE_SYMLINKS=no … … 3172 3800 ])dnl 3173 3801 dnl --------------------------------------------------------------------------- 3174 dnl CF_MAN_PAGES version: 3 5 updated: 2007/03/31 11:47:293802 dnl CF_MAN_PAGES version: 39 updated: 2010/10/23 15:44:18 3175 3803 dnl ------------ 3176 3804 dnl Try to determine if the man-pages on the system are compressed, and if … … 3215 3843 cf_compress=compress 3216 3844 ;; 3217 *gzip*) #(vi3845 *gzip*) 3218 3846 cf_so_strip="gz" 3219 3847 cf_compress=gzip … … 3238 3866 TERMINFO="$TERMINFO" 3239 3867 3240 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"3241 3242 3868 INSTALL="$INSTALL" 3243 3869 INSTALL_DATA="$INSTALL_DATA" … … 3245 3871 transform="$program_transform_name" 3246 3872 3247 TMP=\${TMPDIR -/tmp}/man\$\$3873 TMP=\${TMPDIR:=/tmp}/man\$\$ 3248 3874 trap "rm -f \$TMP" 0 1 2 5 15 3249 3875 … … 3283 3909 if test \$verb = installing ; then 3284 3910 if test ! -d \$cf_subdir\${section} ; then 3285 \$MKDIRS\$cf_subdir\$section3911 mkdir -p \$cf_subdir\$section 3286 3912 fi 3287 3913 fi … … 3303 3929 cf_name=`echo $cf_name|sed "$program_transform_name"` 3304 3930 cat >>$cf_edit_man <<-CF_EOF 3305 s,@$cf_NAME@,$cf_name, 3931 s,@$cf_NAME@,$cf_name,g 3306 3932 CF_EOF 3307 3933 done … … 3432 4058 fi 3433 4059 echo .. \$verb alias \$cf_alias\${suffix} 4060 CF_EOF 4061 case "x$LN_S" in #(vi 4062 *-f) #(vi 4063 cat >>$cf_edit_man <<CF_EOF 4064 $LN_S \$cf_target \$cf_alias\${suffix} 4065 CF_EOF 4066 ;; 4067 *) 4068 cat >>$cf_edit_man <<CF_EOF 3434 4069 rm -f \$cf_alias\${suffix} 3435 4070 $LN_S \$cf_target \$cf_alias\${suffix} 4071 CF_EOF 4072 ;; 4073 esac 4074 cat >>$cf_edit_man <<CF_EOF 3436 4075 elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then 3437 4076 echo ".so \$cf_source" >\$TMP … … 3492 4131 ])dnl 3493 4132 dnl --------------------------------------------------------------------------- 3494 dnl CF_MATH_LIB version: 5 updated: 2000/05/28 01:39:104133 dnl CF_MATH_LIB version: 8 updated: 2010/05/29 16:31:02 3495 4134 dnl ----------- 3496 4135 dnl Checks for libraries. At least one UNIX system, Apple Macintosh … … 3505 4144 #include <math.h> 3506 4145 ], 3507 [double x = rand(); printf("result = %g\n", ]ifelse( $2,,sin(x),$2)[)],4146 [double x = rand(); printf("result = %g\n", ]ifelse([$2],,sin(x),$2)[)], 3508 4147 [cf_cv_need_libm=no], 3509 4148 [cf_cv_need_libm=yes])]) … … 3511 4150 then 3512 4151 ifelse($1,,[ 3513 LIBS="$LIBS -lm"4152 CF_ADD_LIB(m) 3514 4153 ],[$1=-lm]) 3515 4154 fi … … 3546 4185 ])dnl 3547 4186 dnl --------------------------------------------------------------------------- 3548 dnl CF_MKSTEMP version: 5 updated: 2006/12/16 12:33:304187 dnl CF_MKSTEMP version: 7 updated: 2010/08/14 18:25:37 3549 4188 dnl ---------- 3550 4189 dnl Check for a working mkstemp. This creates two files, checks that they are … … 3552 4191 AC_DEFUN([CF_MKSTEMP],[ 3553 4192 AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[ 3554 rm - f conftest*4193 rm -rf conftest* 3555 4194 AC_TRY_RUN([ 3556 4195 #include <sys/types.h> … … 3591 4230 ]) 3592 4231 ]) 3593 if test " $cf_cv_func_mkstemp" =yes ; then4232 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then 3594 4233 AC_DEFINE(HAVE_MKSTEMP) 3595 4234 fi 3596 4235 ])dnl 3597 4236 dnl --------------------------------------------------------------------------- 3598 dnl CF_MSG_LOG version: 4 updated: 2007/07/29 09:55:124237 dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32 3599 4238 dnl ---------- 3600 4239 dnl Write a debug message to config.log, along with the line number in the 3601 4240 dnl configure script. 3602 4241 AC_DEFUN([CF_MSG_LOG],[ 3603 echo "${as_me -configure}:__oline__: testing $* ..." 1>&AC_FD_CC4242 echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC 3604 4243 ])dnl 3605 4244 dnl --------------------------------------------------------------------------- … … 3688 4327 ])dnl 3689 4328 dnl --------------------------------------------------------------------------- 3690 dnl CF_PATHSEP version: 3 updated: 2001/01/12 01:23:534329 dnl CF_PATHSEP version: 5 updated: 2010/05/26 05:38:42 3691 4330 dnl ---------- 3692 4331 dnl Provide a value for the $PATH and similar separator … … 3694 4333 [ 3695 4334 case $cf_cv_system_name in 3696 os2*) PATH SEP=';' ;;3697 *) PATH SEP=':' ;;4335 os2*) PATH_SEPARATOR=';' ;; 4336 *) PATH_SEPARATOR=':' ;; 3698 4337 esac 3699 ifelse( $1,,,[$1=$PATHSEP])3700 AC_SUBST(PATH SEP)3701 ])dnl 3702 dnl --------------------------------------------------------------------------- 3703 dnl CF_PATH_SYNTAX version: 1 2 updated: 2008/03/23 14:45:594338 ifelse([$1],,,[$1=$PATH_SEPARATOR]) 4339 AC_SUBST(PATH_SEPARATOR) 4340 ])dnl 4341 dnl --------------------------------------------------------------------------- 4342 dnl CF_PATH_SYNTAX version: 13 updated: 2010/05/26 05:38:42 3704 4343 dnl -------------- 3705 4344 dnl Check the argument to see that it looks like a pathname. Rewrite it if it … … 3733 4372 ;; 3734 4373 *) 3735 ifelse( $2,,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2)4374 ifelse([$2],,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2) 3736 4375 ;; 3737 4376 esac 3738 4377 ])dnl 3739 4378 dnl --------------------------------------------------------------------------- 3740 dnl CF_POSIX_C_SOURCE version: 6 updated: 2005/07/14 20:25:10 4379 dnl CF_PKG_CONFIG version: 4 updated: 2011/02/18 20:26:24 4380 dnl ------------- 4381 dnl Check for the package-config program, unless disabled by command-line. 4382 AC_DEFUN([CF_PKG_CONFIG], 4383 [ 4384 AC_MSG_CHECKING(if you want to use pkg-config) 4385 AC_ARG_WITH(pkg-config, 4386 [ --with-pkg-config{=path} enable/disable use of pkg-config], 4387 [cf_pkg_config=$withval], 4388 [cf_pkg_config=yes]) 4389 AC_MSG_RESULT($cf_pkg_config) 4390 4391 case $cf_pkg_config in #(vi 4392 no) #(vi 4393 PKG_CONFIG=none 4394 ;; 4395 yes) #(vi 4396 AC_PATH_TOOL(PKG_CONFIG, pkg-config, none) 4397 ;; 4398 *) 4399 PKG_CONFIG=$withval 4400 ;; 4401 esac 4402 4403 test -z "$PKG_CONFIG" && PKG_CONFIG=none 4404 if test "$PKG_CONFIG" != none ; then 4405 CF_PATH_SYNTAX(PKG_CONFIG) 4406 fi 4407 4408 AC_SUBST(PKG_CONFIG) 4409 ])dnl 4410 dnl --------------------------------------------------------------------------- 4411 dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42 3741 4412 dnl ----------------- 3742 4413 dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. … … 3754 4425 AC_DEFUN([CF_POSIX_C_SOURCE], 3755 4426 [ 3756 cf_POSIX_C_SOURCE=ifelse( $1,,199506L,$1)4427 cf_POSIX_C_SOURCE=ifelse([$1],,199506L,[$1]) 3757 4428 3758 4429 cf_save_CFLAGS="$CFLAGS" … … 3806 4477 CFLAGS="$cf_trim_CFLAGS" 3807 4478 CPPFLAGS="$cf_trim_CPPFLAGS" 3808 if test "$cf_cv_cc_u_d_options" = yes ; then 3809 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \ 3810 sed -e 's/-D/-U/g' -e 's/=[[^ ]]*//g'` 3811 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source" 3812 fi 3813 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source" 3814 fi 3815 3816 ])dnl 3817 dnl --------------------------------------------------------------------------- 3818 dnl CF_PREDEFINE version: 1 updated: 2003/07/26 17:53:56 4479 CF_ADD_CFLAGS($cf_cv_posix_c_source) 4480 fi 4481 4482 ])dnl 4483 dnl --------------------------------------------------------------------------- 4484 dnl CF_PREDEFINE version: 2 updated: 2010/05/26 16:44:57 3819 4485 dnl ------------ 3820 4486 dnl Add definitions to CPPFLAGS to ensure they're predefined for all compiles. … … 3833 4499 3834 4500 if test "$cf_result" = yes ; then 3835 CPPFLAGS="$CPPFLAGS ifelse( $2,,-D$1,[-D$1=$2])"4501 CPPFLAGS="$CPPFLAGS ifelse([$2],,-D$1,[-D$1=$2])" 3836 4502 elif test "x$2" != "x" ; then 3837 4503 AC_MSG_CHECKING(checking for compatible value versus $2) … … 3873 4539 ])dnl 3874 4540 dnl --------------------------------------------------------------------------- 4541 dnl CF_PROG_AR version: 1 updated: 2009/01/01 20:15:22 4542 dnl ---------- 4543 dnl Check for archiver "ar". 4544 AC_DEFUN([CF_PROG_AR],[ 4545 AC_CHECK_TOOL(AR, ar, ar) 4546 ]) 4547 dnl --------------------------------------------------------------------------- 3875 4548 dnl CF_PROG_AWK version: 1 updated: 2006/09/16 11:40:59 3876 4549 dnl ----------- … … 3882 4555 ])dnl 3883 4556 dnl --------------------------------------------------------------------------- 3884 dnl CF_PROG_CC_C_O version: 2 updated: 2006/12/16 15:55:464557 dnl CF_PROG_CC_C_O version: 3 updated: 2010/08/14 18:25:37 3885 4558 dnl -------------- 3886 4559 dnl Analogous to AC_PROG_CC_C_O, but more useful: tests only $CC, ensures that … … 3912 4585 eval cf_cv_prog_$1_c_o=no 3913 4586 fi 3914 rm - f conftest*4587 rm -rf conftest* 3915 4588 ])dnl 3916 4589 if test $cf_cv_prog_$1_c_o = yes; then … … 3984 4657 AC_SUBST(PROG_EXT) 3985 4658 test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT") 4659 ])dnl 4660 dnl --------------------------------------------------------------------------- 4661 dnl CF_PROG_GNAT version: 1 updated: 2010/06/19 15:22:18 4662 dnl ------------ 4663 dnl Check for gnatmake, ensure that it is complete. 4664 AC_DEFUN([CF_PROG_GNAT],[ 4665 cf_ada_make=gnatmake 4666 AC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no) 4667 if test "$ac_cv_prog_gnat_exists" = no; then 4668 cf_ada_make= 4669 else 4670 CF_GNAT_VERSION 4671 AC_CHECK_PROG(M4_exists, m4, yes, no) 4672 if test "$ac_cv_prog_M4_exists" = no; then 4673 cf_cv_prog_gnat_correct=no 4674 echo Ada95 binding required program m4 not found. Ada95 binding disabled. 4675 fi 4676 if test "$cf_cv_prog_gnat_correct" = yes; then 4677 AC_MSG_CHECKING(if GNAT works) 4678 CF_GNAT_TRY_RUN([procedure conftest;], 4679 [with Text_IO; 4680 with GNAT.OS_Lib; 4681 procedure conftest is 4682 begin 4683 Text_IO.Put ("Hello World"); 4684 Text_IO.New_Line; 4685 GNAT.OS_Lib.OS_Exit (0); 4686 end conftest;],[cf_cv_prog_gnat_correct=yes],[cf_cv_prog_gnat_correct=no]) 4687 AC_MSG_RESULT($cf_cv_prog_gnat_correct) 4688 fi 4689 fi 4690 4691 AC_SUBST(cf_ada_make) 3986 4692 ])dnl 3987 4693 dnl --------------------------------------------------------------------------- … … 4004 4710 ])dnl 4005 4711 dnl --------------------------------------------------------------------------- 4006 dnl CF_PROG_LDCONFIG version: 1 updated: 2003/09/20 17:07:554712 dnl CF_PROG_LDCONFIG version: 2 updated: 2008/12/13 14:08:40 4007 4713 dnl ---------------- 4008 4714 dnl Check for ldconfig, needed to fixup shared libraries that would be built … … 4013 4719 else 4014 4720 case "$cf_cv_system_name" in #(vi 4015 freebsd*) #(vi4721 dragonfly*|freebsd*) #(vi 4016 4722 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R" 4017 4723 ;; … … 4024 4730 ])dnl 4025 4731 dnl --------------------------------------------------------------------------- 4026 dnl CF_PROG_LINT version: 1 updated: 2006/09/16 11:40:594732 dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14 4027 4733 dnl ------------ 4028 4734 AC_DEFUN([CF_PROG_LINT], 4029 4735 [ 4030 AC_CHECK_PROGS(LINT, tdlint lint alint )4736 AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint) 4031 4737 AC_SUBST(LINT_OPTS) 4032 4738 ])dnl 4033 4739 dnl --------------------------------------------------------------------------- 4034 dnl CF_REGEX version: 3 updated: 1997/11/01 14:26:01 4740 dnl CF_PROG_LN_S version: 2 updated: 2010/08/14 18:25:37 4741 dnl ------------ 4742 dnl Combine checks for "ln -s" and "ln -sf", updating $LN_S to include "-f" 4743 dnl option if it is supported. 4744 AC_DEFUN([CF_PROG_LN_S],[ 4745 AC_PROG_LN_S 4746 AC_MSG_CHECKING(if $LN_S -f options work) 4747 4748 rm -f conf$$.src conf$$dst 4749 echo >conf$$.dst 4750 echo first >conf$$.src 4751 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then 4752 cf_prog_ln_sf=yes 4753 else 4754 cf_prog_ln_sf=no 4755 fi 4756 rm -f conf$$.dst conf$$src 4757 AC_MSG_RESULT($cf_prog_ln_sf) 4758 4759 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f" 4760 ])dnl 4761 dnl --------------------------------------------------------------------------- 4762 dnl CF_REGEX version: 8 updated: 2010/08/07 14:09:44 4035 4763 dnl -------- 4036 4764 dnl Attempt to determine if we've got one of the flavors of regular-expression … … 4038 4766 AC_DEFUN([CF_REGEX], 4039 4767 [ 4040 AC_MSG_CHECKING([for regular-expression headers]) 4041 AC_CACHE_VAL(cf_cv_regex,[ 4042 AC_TRY_LINK([#include <sys/types.h> 4043 #include <regex.h>],[ 4044 regex_t *p; 4045 int x = regcomp(p, "", 0); 4046 int y = regexec(p, "", 0, 0, 0); 4047 regfree(p); 4048 ],[cf_cv_regex="regex.h"],[ 4049 AC_TRY_LINK([#include <regexp.h>],[ 4050 char *p = compile("", "", "", 0); 4051 int x = step("", ""); 4052 ],[cf_cv_regex="regexp.h"],[ 4053 cf_save_LIBS="$LIBS" 4054 LIBS="-lgen $LIBS" 4055 AC_TRY_LINK([#include <regexpr.h>],[ 4056 char *p = compile("", "", ""); 4768 4769 cf_regex_func=no 4770 4771 cf_regex_libs="regex re" 4772 case $host_os in #(vi 4773 mingw*) 4774 cf_regex_libs="regex.dll $cf_regex_libs" 4775 ;; 4776 esac 4777 4778 AC_CHECK_FUNC(regcomp,[cf_regex_func=regcomp],[ 4779 for cf_regex_lib in $cf_regex_libs 4780 do 4781 AC_CHECK_LIB($cf_regex_lib,regcomp,[ 4782 CF_ADD_LIB($cf_regex_lib) 4783 cf_regex_func=regcomp 4784 break]) 4785 done 4786 ]) 4787 4788 if test "$cf_regex_func" = no ; then 4789 AC_CHECK_FUNC(compile,[cf_regex_func=compile],[ 4790 AC_CHECK_LIB(gen,compile,[ 4791 CF_ADD_LIB(gen) 4792 cf_regex_func=compile])]) 4793 fi 4794 4795 if test "$cf_regex_func" = no ; then 4796 AC_MSG_WARN(cannot find regular expression library) 4797 fi 4798 4799 AC_CACHE_CHECK(for regular-expression headers,cf_cv_regex_hdrs,[ 4800 4801 cf_cv_regex_hdrs=no 4802 case $cf_regex_func in #(vi 4803 compile) #(vi 4804 for cf_regex_hdr in regexp.h regexpr.h 4805 do 4806 AC_TRY_LINK([#include <$cf_regex_hdr>],[ 4807 char *p = compile("", "", "", 0); 4057 4808 int x = step("", ""); 4058 ],[cf_cv_regex="regexpr.h"],[LIBS="$cf_save_LIBS"])])]) 4809 ],[ 4810 cf_cv_regex_hdrs=$cf_regex_hdr 4811 break 4812 ]) 4813 done 4814 ;; 4815 *) 4816 for cf_regex_hdr in regex.h 4817 do 4818 AC_TRY_LINK([#include <sys/types.h> 4819 #include <$cf_regex_hdr>],[ 4820 regex_t *p; 4821 int x = regcomp(p, "", 0); 4822 int y = regexec(p, "", 0, 0, 0); 4823 regfree(p); 4824 ],[ 4825 cf_cv_regex_hdrs=$cf_regex_hdr 4826 break 4827 ]) 4828 done 4829 ;; 4830 esac 4831 4059 4832 ]) 4060 AC_MSG_RESULT($cf_cv_regex) 4061 case $cf_cv_regex in 4062 regex.h) AC_DEFINE(HAVE_REGEX_H_FUNCS) ;; 4063 regexp.h) AC_DEFINE(HAVE_REGEXP_H_FUNCS) ;; 4064 regexpr.h) AC_DEFINE(HAVE_REGEXPR_H_FUNCS) ;; 4833 4834 case $cf_cv_regex_hdrs in #(vi 4835 no) AC_MSG_WARN(no regular expression header found) ;; #(vi 4836 regex.h) AC_DEFINE(HAVE_REGEX_H_FUNCS) ;; #(vi 4837 regexp.h) AC_DEFINE(HAVE_REGEXP_H_FUNCS) ;; #(vi 4838 regexpr.h) AC_DEFINE(HAVE_REGEXPR_H_FUNCS) ;; 4065 4839 esac 4066 4840 ])dnl 4067 4841 dnl --------------------------------------------------------------------------- 4068 dnl CF_REMOVE_DEFINE version: 2 updated: 2005/07/09 16:12:184842 dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 4069 4843 dnl ---------------- 4070 4844 dnl Remove all -U and -D options that refer to the given symbol from a list … … 4078 4852 define([CF_REMOVE_DEFINE], 4079 4853 [ 4080 # remove $3 symbol from $24081 4854 $1=`echo "$2" | \ 4082 sed -e 's/-[[UD]] $3\(=[[^ ]]*\)\?[[ ]]/ /g' \4083 -e 's/-[[UD]] $3\(=[[^ ]]*\)\?[$]//g'`4855 sed -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[[ ]]/ /g' \ 4856 -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'` 4084 4857 ])dnl 4085 4858 dnl --------------------------------------------------------------------------- … … 4097 4870 ])dnl 4098 4871 dnl --------------------------------------------------------------------------- 4099 dnl CF_RPATH_HACK version: 4 updated: 2008/09/13 12:53:264872 dnl CF_RPATH_HACK version: 9 updated: 2011/02/13 13:31:33 4100 4873 dnl ------------- 4101 4874 AC_DEFUN([CF_RPATH_HACK], 4102 4875 [ 4103 AC_REQUIRE([CF_ SHARED_OPTS])4876 AC_REQUIRE([CF_LD_RPATH_OPT]) 4104 4877 AC_MSG_CHECKING(for updated LDFLAGS) 4105 if test -n "$LDFLAGS" ; then 4106 AC_MSG_RESULT(maybe) 4107 CF_VERBOSE(...checking LDFLAGS $LDFLAGS) 4108 CF_VERBOSE(...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS) 4109 case "$EXTRA_LDFLAGS" in #(vi 4110 -Wl,-rpath,*) #(vi 4111 cf_rpath_hack="-Wl,-rpath," 4112 ;; 4113 -R\ *) 4114 cf_rpath_hack="-R " 4115 ;; 4116 -R*) 4117 cf_rpath_hack="-R" 4118 ;; 4119 *) 4120 cf_rpath_hack= 4121 ;; 4122 esac 4123 if test -n "$cf_rpath_hack" ; then 4124 cf_rpath_dst= 4125 for cf_rpath_src in $LDFLAGS 4126 do 4127 CF_VERBOSE(Filtering $cf_rpath_src) 4128 case $cf_rpath_src in #(vi 4129 -L*) #(vi 4130 if test "$cf_rpath_hack" = "-R " ; then 4131 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'` 4878 if test -n "$LD_RPATH_OPT" ; then 4879 AC_MSG_RESULT(maybe) 4880 4881 AC_CHECK_PROGS(cf_ldd_prog,ldd,no) 4882 cf_rpath_list="/usr/lib /lib" 4883 if test "$cf_ldd_prog" != no 4884 then 4885 cf_rpath_oops= 4886 4887 AC_TRY_LINK([#include <stdio.h>], 4888 [printf("Hello");], 4889 [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u` 4890 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort -u`]) 4891 4892 # If we passed the link-test, but get a "not found" on a given library, 4893 # this could be due to inept reconfiguration of gcc to make it only 4894 # partly honor /usr/local/lib (or whatever). Sometimes this behavior 4895 # is intentional, e.g., installing gcc in /usr/bin and suppressing the 4896 # /usr/local libraries. 4897 if test -n "$cf_rpath_oops" 4898 then 4899 for cf_rpath_src in $cf_rpath_oops 4900 do 4901 for cf_rpath_dir in \ 4902 /usr/local \ 4903 /usr/pkg \ 4904 /opt/sfw 4905 do 4906 if test -f $cf_rpath_dir/lib/$cf_rpath_src 4907 then 4908 CF_VERBOSE(...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src) 4909 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib" 4910 break 4911 fi 4912 done 4913 done 4914 fi 4915 fi 4916 4917 CF_VERBOSE(...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS) 4918 4919 CF_RPATH_HACK_2(LDFLAGS) 4920 CF_RPATH_HACK_2(LIBS) 4921 4922 CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS) 4923 fi 4924 AC_SUBST(EXTRA_LDFLAGS) 4925 ])dnl 4926 dnl --------------------------------------------------------------------------- 4927 dnl CF_RPATH_HACK_2 version: 6 updated: 2010/04/17 16:31:24 4928 dnl --------------- 4929 dnl Do one set of substitutions for CF_RPATH_HACK, adding an rpath option to 4930 dnl EXTRA_LDFLAGS for each -L option found. 4931 dnl 4932 dnl $cf_rpath_list contains a list of directories to ignore. 4933 dnl 4934 dnl $1 = variable name to update. The LDFLAGS variable should be the only one, 4935 dnl but LIBS often has misplaced -L options. 4936 AC_DEFUN([CF_RPATH_HACK_2], 4937 [ 4938 CF_VERBOSE(...checking $1 [$]$1) 4939 4940 cf_rpath_dst= 4941 for cf_rpath_src in [$]$1 4942 do 4943 case $cf_rpath_src in #(vi 4944 -L*) #(vi 4945 4946 # check if this refers to a directory which we will ignore 4947 cf_rpath_skip=no 4948 if test -n "$cf_rpath_list" 4949 then 4950 for cf_rpath_item in $cf_rpath_list 4951 do 4952 if test "x$cf_rpath_src" = "x-L$cf_rpath_item" 4953 then 4954 cf_rpath_skip=yes 4955 break 4956 fi 4957 done 4958 fi 4959 4960 if test "$cf_rpath_skip" = no 4961 then 4962 # transform the option 4963 if test "$LD_RPATH_OPT" = "-R " ; then 4964 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"` 4132 4965 else 4133 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`4966 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"` 4134 4967 fi 4135 CF_VERBOSE(...Filter $cf_rpath_tmp) 4136 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS" 4137 ;; 4138 esac 4139 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src" 4140 done 4141 LDFLAGS=$cf_rpath_dst 4142 CF_VERBOSE(...checked LDFLAGS $LDFLAGS) 4143 CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS) 4144 fi 4145 else 4146 AC_MSG_RESULT(no) 4147 fi 4148 ])dnl 4149 dnl --------------------------------------------------------------------------- 4150 dnl CF_SHARED_OPTS version: 53 updated: 2008/10/25 18:14:20 4968 4969 # if we have not already added this, add it now 4970 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"` 4971 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS" 4972 then 4973 CF_VERBOSE(...Filter $cf_rpath_src ->$cf_rpath_tmp) 4974 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS" 4975 fi 4976 fi 4977 ;; 4978 esac 4979 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src" 4980 done 4981 $1=$cf_rpath_dst 4982 4983 CF_VERBOSE(...checked $1 [$]$1) 4984 AC_SUBST(EXTRA_LDFLAGS) 4985 ])dnl 4986 dnl --------------------------------------------------------------------------- 4987 dnl CF_SHARED_OPTS version: 64 updated: 2010/06/05 16:51:16 4151 4988 dnl -------------- 4152 4989 dnl -------------- … … 4175 5012 [ 4176 5013 AC_REQUIRE([CF_SUBST_NCURSES_VERSION]) 5014 AC_REQUIRE([CF_LD_RPATH_OPT]) 4177 5015 LOCAL_LDFLAGS= 4178 5016 LOCAL_LDFLAGS2= … … 4181 5019 4182 5020 cf_cv_do_symlinks=no 5021 cf_ld_rpath_opt= 5022 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT" 4183 5023 4184 5024 AC_MSG_CHECKING(if release/abi version should be used for shared libs) … … 4219 5059 cf_cv_shlib_version_infix=no 4220 5060 4221 case $cf_cv_system_name in 4222 beos*) 5061 case $cf_cv_system_name in #(vi 5062 aix[[56]]*) #(vi 5063 if test "$GCC" = yes; then 5064 CC_SHARED_OPTS= 5065 MK_SHARED_LIB='$(CC) -shared' 5066 fi 5067 ;; 5068 beos*) #(vi 4223 5069 MK_SHARED_LIB='${CC} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0' 4224 5070 ;; 4225 cygwin*) 5071 cygwin*) #(vi 4226 5072 CC_SHARED_OPTS= 4227 5073 MK_SHARED_LIB='sh ../mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}' … … 4240 5086 exec \[$]* -shared -Wl,--out-implib=../lib/\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\[$]{SHARED_LIB} 4241 5087 CF_EOF 4242 chmod +x mk_shared_lib.sh 5088 chmod +x mk_shared_lib.sh 4243 5089 ;; 4244 darwin*) 5090 darwin*) #(vi 4245 5091 EXTRA_CFLAGS="-no-cpp-precomp" 4246 5092 CC_SHARED_OPTS="-dynamic" … … 4257 5103 fi 4258 5104 ;; 4259 hpux*) 5105 hpux*) #(vi 4260 5106 # (tested with gcc 2.7.2 -- I don't have c89) 4261 5107 if test "$GCC" = yes; then … … 4270 5116 INSTALL_LIB="-m 555" 4271 5117 ;; 4272 irix*) 4273 if test "$cf_cv_ld_rpath" = yes ; then 4274 if test "$GCC" = yes; then 4275 cf_ld_rpath_opt="-Wl,-rpath," 4276 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS" 4277 else 4278 cf_ld_rpath_opt="-rpath " 4279 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS" 4280 fi 5118 irix*) #(vi 5119 if test "$cf_cv_enable_rpath" = yes ; then 5120 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS" 4281 5121 fi 4282 5122 # tested with IRIX 5.2 and 'cc'. … … 4289 5129 cf_cv_rm_so_locs=yes 4290 5130 ;; 4291 linux*|gnu*|k*bsd*-gnu) 5131 linux*|gnu*|k*bsd*-gnu) #(vi 4292 5132 if test "$DFT_LWR_MODEL" = "shared" ; then 4293 LOCAL_LDFLAGS=" -Wl,-rpath,\$(LOCAL_LIBDIR)"5133 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" 4294 5134 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" 4295 5135 fi 4296 if test "$cf_cv_ld_rpath" = yes ; then 4297 cf_ld_rpath_opt="-Wl,-rpath," 4298 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS" 5136 if test "$cf_cv_enable_rpath" = yes ; then 5137 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS" 4299 5138 fi 4300 5139 CF_SHARED_SONAME 4301 5140 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' 4302 5141 ;; 4303 openbsd[[2-9]].*) 5142 openbsd[[2-9]].*) #(vi 4304 5143 if test "$DFT_LWR_MODEL" = "shared" ; then 4305 LOCAL_LDFLAGS=" -Wl,-rpath,\$(LOCAL_LIBDIR)"5144 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" 4306 5145 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" 4307 5146 fi 4308 if test "$cf_cv_ld_rpath" = yes ; then 4309 cf_ld_rpath_opt="-Wl,-rpath," 4310 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS" 5147 if test "$cf_cv_enable_rpath" = yes ; then 5148 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS" 4311 5149 fi 4312 5150 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" 4313 5151 CF_SHARED_SONAME 4314 MK_SHARED_LIB='${CC} ${CFLAGS} - Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'5152 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' 4315 5153 ;; 4316 nto-qnx*|openbsd*|freebsd[[12]].*) 5154 nto-qnx*|openbsd*|freebsd[[12]].*) #(vi 4317 5155 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" 4318 5156 MK_SHARED_LIB='${LD} -Bshareable -o $[@]' 4319 5157 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel 4320 5158 ;; 4321 freebsd*) 5159 freebsd*) #(vi 4322 5160 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" 4323 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then 4324 LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)" 4325 LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS" 4326 cf_ld_rpath_opt="-rpath " 4327 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS" 5161 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then 5162 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)" 5163 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS" 5164 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS" 4328 5165 fi 4329 5166 CF_SHARED_SONAME 4330 MK_SHARED_LIB='${LD} - Bshareable -soname=`basename $[@]` -o $[@]'5167 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $[@]` -o $[@]' 4331 5168 ;; 4332 netbsd*) 5169 netbsd*) #(vi 4333 5170 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" 4334 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath," 4335 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then 4336 LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)" 5171 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then 5172 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)" 4337 5173 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" 4338 EXTRA_LDFLAGS=" -Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"5174 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS" 4339 5175 if test "$cf_cv_shlib_version" = auto; then 4340 5176 if test -f /usr/libexec/ld.elf_so; then … … 4347 5183 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]' 4348 5184 else 4349 MK_SHARED_LIB='${LD} - Bshareable -o $[@]'5185 MK_SHARED_LIB='${LD} -shared -Bshareable -o $[@]' 4350 5186 fi 4351 5187 ;; 4352 osf*|mls+*) 5188 osf*|mls+*) #(vi 4353 5189 # tested with OSF/1 V3.2 and 'cc' 4354 5190 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't 4355 5191 # link with shared libs). 4356 5192 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $[@]`' 4357 case $host_os in 5193 case $host_os in #(vi 4358 5194 osf4*) 4359 5195 MK_SHARED_LIB="${MK_SHARED_LIB} -msym" … … 4362 5198 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]' 4363 5199 if test "$DFT_LWR_MODEL" = "shared" ; then 4364 LOCAL_LDFLAGS=" -Wl,-rpath,\$(LOCAL_LIBDIR)"5200 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" 4365 5201 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" 4366 fi4367 if test "$cf_cv_ld_rpath" = yes ; then4368 cf_ld_rpath_opt="-rpath"4369 # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"4370 5202 fi 4371 5203 cf_cv_rm_so_locs=yes 4372 5204 ;; 4373 sco3.2v5*) # (also uw2* and UW7 )hops 13-Apr-985205 sco3.2v5*) # (also uw2* and UW7: hops 13-Apr-98 4374 5206 # tested with osr5.0.5 4375 5207 if test "$GCC" != yes; then … … 4377 5209 fi 4378 5210 MK_SHARED_LIB='${LD} -dy -G -h `basename $[@] .${REL_VERSION}`.${ABI_VERSION} -o [$]@' 4379 if test "$cf_cv_ ld_rpath" = yes ; then5211 if test "$cf_cv_enable_rpath" = yes ; then 4380 5212 # only way is to set LD_RUN_PATH but no switch for it 4381 5213 RUN_PATH=$libdir … … 4385 5217 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib' 4386 5218 ;; 4387 sunos4*) 5219 sunos4*) #(vi 4388 5220 # tested with SunOS 4.1.1 and gcc 2.7.0 4389 5221 if test "$GCC" != yes; then … … 4393 5225 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel 4394 5226 ;; 4395 solaris2*) 5227 solaris2*) #(vi 4396 5228 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 4397 5229 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3 … … 4400 5232 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" 4401 5233 fi 4402 if test "$cf_cv_ld_rpath" = yes ; then 4403 cf_ld_rpath_opt="-R" 4404 EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS" 5234 if test "$cf_cv_enable_rpath" = yes ; then 5235 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS" 4405 5236 fi 4406 5237 CF_SHARED_SONAME 4407 5238 if test "$GCC" != yes; then 4408 CC_SHARED_OPTS='-xcode=pic32' 5239 cf_save_CFLAGS="$CFLAGS" 5240 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O 5241 do 5242 CFLAGS="$cf_shared_opts $cf_save_CFLAGS" 5243 AC_TRY_COMPILE([#include <stdio.h>],[printf("Hello\n");],[break]) 5244 done 5245 CFLAGS="$cf_save_CFLAGS" 5246 CC_SHARED_OPTS=$cf_shared_opts 4409 5247 MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $[@]' 4410 5248 else … … 4412 5250 fi 4413 5251 ;; 4414 sysv5uw7*|unix_sv*) 5252 sysv5uw7*|unix_sv*) #(vi 4415 5253 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc) 4416 5254 if test "$GCC" != yes; then … … 4429 5267 rel|abi) 4430 5268 case "$MK_SHARED_LIB" in #(vi 4431 *'-o $[@]') 5269 *'-o $[@]') #(vi 4432 5270 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes 4433 5271 ;; … … 4440 5278 4441 5279 if test -n "$cf_ld_rpath_opt" ; then 4442 AC_MSG_CHECKING(if we need a space after rpath option)4443 cf_save_LIBS="$LIBS"4444 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"4445 AC_TRY_LINK(, , cf_rpath_space=no, cf_rpath_space=yes)4446 LIBS="$cf_save_LIBS"4447 AC_MSG_RESULT($cf_rpath_space)4448 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "4449 5280 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}" 4450 5281 fi 4451 5282 4452 5283 AC_SUBST(CC_SHARED_OPTS) 5284 AC_SUBST(LD_RPATH_OPT) 4453 5285 AC_SUBST(LD_SHARED_OPTS) 4454 5286 AC_SUBST(MK_SHARED_LIB) … … 4643 5475 ])dnl 4644 5476 dnl --------------------------------------------------------------------------- 4645 dnl CF_SRC_MODULES version: 18 updated: 2005/05/28 12:58:545477 dnl CF_SRC_MODULES version: 21 updated: 2010/09/04 17:37:40 4646 5478 dnl -------------- 4647 5479 dnl For each parameter, test if the source-directory exists, and if it contains … … 4718 5550 AC_SUBST(TEST_DEP2) 4719 5551 4720 SRC_SUBDIRS="man include" 5552 SRC_SUBDIRS= 5553 if test "x$cf_with_manpages" != xno ; then 5554 SRC_SUBDIRS="$SRC_SUBDIRS man" 5555 fi 5556 SRC_SUBDIRS="$SRC_SUBDIRS include" 4721 5557 for cf_dir in $cf_cv_src_modules 4722 5558 do 4723 5559 SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir" 4724 5560 done 4725 SRC_SUBDIRS="$SRC_SUBDIRS test" 5561 if test "x$cf_with_tests" != "xno" ; then 5562 SRC_SUBDIRS="$SRC_SUBDIRS test" 5563 fi 4726 5564 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc" 4727 5565 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++" … … 4729 5567 ADA_SUBDIRS= 4730 5568 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then 4731 SRC_SUBDIRS="$SRC_SUBDIRS Ada95" 4732 ADA_SUBDIRS="gen src samples" 5569 SRC_SUBDIRS="$SRC_SUBDIRS Ada95" 5570 ADA_SUBDIRS="gen src" 5571 if test "x$cf_with_tests" != "xno" ; then 5572 ADA_SUBDIRS="$ADA_SUBDIRS samples" 5573 fi 4733 5574 fi 4734 5575 … … 4740 5581 4741 5582 if test -n "$ADA_SUBDIRS"; then 4742 4743 4744 4745 4746 4747 fi 4748 ])dnl 4749 dnl --------------------------------------------------------------------------- 4750 dnl CF_STDCPP_LIBRARY version: 5 updated: 2000/08/12 23:18:525583 for cf_dir in $ADA_SUBDIRS 5584 do 5585 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile" 5586 done 5587 AC_SUBST(ADA_SUBDIRS) 5588 fi 5589 ])dnl 5590 dnl --------------------------------------------------------------------------- 5591 dnl CF_STDCPP_LIBRARY version: 7 updated: 2010/05/29 16:31:02 4751 5592 dnl ----------------- 4752 5593 dnl Check for -lstdc++, which is GNU's standard C++ library. … … 4764 5605 AC_CACHE_CHECK(for library $cf_stdcpp_libname,cf_cv_libstdcpp,[ 4765 5606 cf_save="$LIBS" 4766 LIBS="$LIBS -l$cf_stdcpp_libname"5607 CF_ADD_LIB($cf_stdcpp_libname) 4767 5608 AC_TRY_LINK([ 4768 5609 #include <strstream.h>],[ … … 4774 5615 LIBS="$cf_save" 4775 5616 ]) 4776 test "$cf_cv_libstdcpp" = yes && C XXLIBS="$CXXLIBS -l$cf_stdcpp_libname"5617 test "$cf_cv_libstdcpp" = yes && CF_ADD_LIB($cf_stdcpp_libname,CXXLIBS) 4777 5618 fi 4778 5619 ])dnl … … 4847 5688 ])dnl 4848 5689 dnl --------------------------------------------------------------------------- 4849 dnl CF_SUBDIR_PATH version: 5 updated: 2007/07/29 09:55:125690 dnl CF_SUBDIR_PATH version: 6 updated: 2010/04/21 06:20:50 4850 5691 dnl -------------- 4851 5692 dnl Construct a search-list for a nonstandard header/lib-file … … 4854 5695 dnl $3 = the subdirectory, e.g., bin, include or lib 4855 5696 AC_DEFUN([CF_SUBDIR_PATH], 4856 [$1="" 5697 [ 5698 $1= 4857 5699 4858 5700 CF_ADD_SUBDIR_PATH($1,$2,$3,/usr,$prefix) … … 5049 5891 ])dnl 5050 5892 dnl --------------------------------------------------------------------------- 5051 dnl CF_UTF8_LIB version: 5 updated: 2008/10/17 19:37:525893 dnl CF_UTF8_LIB version: 7 updated: 2010/06/20 09:24:28 5052 5894 dnl ----------- 5053 5895 dnl Check for multibyte support, and if not found, utf8 compatibility library … … 5071 5913 CF_ADD_INCDIR($cf_cv_header_path_utf8) 5072 5914 CF_ADD_LIBDIR($cf_cv_library_path_utf8) 5073 LIBS="-lutf8 $LIBS" 5074 fi 5075 ])dnl 5915 CF_ADD_LIBS($cf_cv_library_file_utf8) 5916 fi 5917 ])dnl 5918 dnl --------------------------------------------------------------------------- 5919 dnl CF_VA_COPY version: 2 updated: 2010/03/04 05:37:29 5920 dnl ---------- 5921 dnl check for va_copy, part of stdarg.h 5922 dnl Also, workaround for glibc's __va_copy, by checking for both. 5923 AC_DEFUN([CF_VA_COPY],[ 5924 AC_CACHE_CHECK(for va_copy, cf_cv_have_va_copy,[ 5925 AC_TRY_LINK([ 5926 #include <stdarg.h> 5927 ],[ 5928 static va_list dst; 5929 static va_list src; 5930 va_copy(dst, src)], 5931 cf_cv_have_va_copy=yes, 5932 cf_cv_have_va_copy=no)]) 5933 5934 test "$cf_cv_have_va_copy" = yes && AC_DEFINE(HAVE_VA_COPY) 5935 5936 AC_CACHE_CHECK(for __va_copy, cf_cv_have___va_copy,[ 5937 AC_TRY_LINK([ 5938 #include <stdarg.h> 5939 ],[ 5940 static va_list dst; 5941 static va_list src; 5942 __va_copy(dst, src)], 5943 cf_cv_have___va_copy=yes, 5944 cf_cv_have___va_copy=no)]) 5945 5946 test "$cf_cv_have___va_copy" = yes && AC_DEFINE(HAVE___VA_COPY) 5947 ]) 5076 5948 dnl --------------------------------------------------------------------------- 5077 5949 dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12 … … 5083 5955 ])dnl 5084 5956 dnl --------------------------------------------------------------------------- 5085 dnl CF_WCHAR_TYPE version: 2 updated: 2004/01/17 19:18:205957 dnl CF_WCHAR_TYPE version: 3 updated: 2010/05/26 16:44:57 5086 5958 dnl ------------- 5087 5959 dnl Check if type wide-character type $1 is declared, and if so, which header … … 5119 5991 fi 5120 5992 5121 ifelse( $2,,,[5993 ifelse([$2],,,[ 5122 5994 # if we do not find $1 in either place, use substitution to provide a fallback. 5123 5995 if test "$cf_cv_$1" = unknown ; then … … 5179 6051 ])dnl 5180 6052 dnl --------------------------------------------------------------------------- 5181 dnl CF_WITH_DBMALLOC version: 6 updated: 2006/12/16 14:24:05 6053 dnl CF_WITH_ADA_COMPILER version: 2 updated: 2010/06/26 17:35:58 6054 dnl -------------------- 6055 dnl Command-line option to specify the Ada95 compiler. 6056 AC_DEFUN([CF_WITH_ADA_COMPILER],[ 6057 AC_MSG_CHECKING(for ada-compiler) 6058 AC_ARG_WITH(ada-compiler, 6059 [ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)], 6060 [cf_ada_compiler=$withval], 6061 [cf_ada_compiler=gnatmake]) 6062 AC_SUBST(cf_ada_compiler) 6063 AC_MSG_RESULT($cf_ada_compiler) 6064 ])dnl 6065 dnl --------------------------------------------------------------------------- 6066 dnl CF_WITH_ADA_INCLUDE version: 2 updated: 2010/06/26 17:35:58 6067 dnl ------------------- 6068 dnl Command-line option to specify where Ada includes will install. 6069 AC_DEFUN([CF_WITH_ADA_INCLUDE],[ 6070 AC_MSG_CHECKING(for ada-include) 6071 CF_WITH_PATH(ada-include, 6072 [ --with-ada-include=DIR Ada includes are in DIR], 6073 ADA_INCLUDE, 6074 PREFIX/share/ada/adainclude, 6075 [$]prefix/share/ada/adainclude) 6076 AC_SUBST(ADA_INCLUDE) 6077 AC_MSG_RESULT($ADA_INCLUDE) 6078 ])dnl 6079 dnl --------------------------------------------------------------------------- 6080 dnl CF_WITH_ADA_OBJECTS version: 2 updated: 2010/06/26 17:35:58 6081 dnl ------------------- 6082 dnl Command-line option to specify where Ada objects will install. 6083 AC_DEFUN([CF_WITH_ADA_OBJECTS],[ 6084 AC_MSG_CHECKING(for ada-objects) 6085 CF_WITH_PATH(ada-objects, 6086 [ --with-ada-objects=DIR Ada objects are in DIR], 6087 ADA_OBJECTS, 6088 PREFIX/lib/ada/adalib, 6089 [$]prefix/lib/ada/adalib) 6090 AC_SUBST(ADA_OBJECTS) 6091 AC_MSG_RESULT($ADA_OBJECTS) 6092 ])dnl 6093 dnl --------------------------------------------------------------------------- 6094 dnl CF_WITH_ADA_SHAREDLIB version: 2 updated: 2010/06/26 17:35:58 6095 dnl --------------------- 6096 dnl Command-line option to specify if an Ada95 shared-library should be built, 6097 dnl and optionally what its soname should be. 6098 AC_DEFUN([CF_WITH_ADA_SHAREDLIB],[ 6099 AC_MSG_CHECKING(if an Ada95 shared-library should be built) 6100 AC_ARG_WITH(ada-sharedlib, 6101 [ --with-ada-sharedlib=XX build Ada95 shared-library], 6102 [with_ada_sharedlib=$withval], 6103 [with_ada_sharedlib=no]) 6104 AC_MSG_RESULT($with_ada_sharedlib) 6105 6106 ADA_SHAREDLIB='lib$(LIB_NAME).so.1' 6107 MAKE_ADA_SHAREDLIB="#" 6108 6109 if test "x$with_ada_sharedlib" != xno 6110 then 6111 MAKE_ADA_SHAREDLIB= 6112 if test "x$with_ada_sharedlib" != xyes 6113 then 6114 ADA_SHAREDLIB="$with_ada_sharedlib" 6115 fi 6116 fi 6117 6118 AC_SUBST(ADA_SHAREDLIB) 6119 AC_SUBST(MAKE_ADA_SHAREDLIB) 6120 ])dnl 6121 dnl --------------------------------------------------------------------------- 6122 dnl CF_WITH_DBMALLOC version: 7 updated: 2010/06/21 17:26:47 5182 6123 dnl ---------------- 5183 6124 dnl Configure-option for dbmalloc. The optional parameter is used to override … … 5190 6131 if test "$with_dbmalloc" = yes ; then 5191 6132 AC_CHECK_HEADER(dbmalloc.h, 5192 [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse( $1,,[],[,$1]))])5193 fi 5194 ])dnl 5195 dnl --------------------------------------------------------------------------- 5196 dnl CF_WITH_DMALLOC version: 6 updated: 2006/12/16 14:24:056133 [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse([$1],,[],[,$1]))]) 6134 fi 6135 ])dnl 6136 dnl --------------------------------------------------------------------------- 6137 dnl CF_WITH_DMALLOC version: 7 updated: 2010/06/21 17:26:47 5197 6138 dnl --------------- 5198 6139 dnl Configure-option for dmalloc. The optional parameter is used to override … … 5205 6146 if test "$with_dmalloc" = yes ; then 5206 6147 AC_CHECK_HEADER(dmalloc.h, 5207 [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse( $1,,[],[,$1]))])6148 [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse([$1],,[],[,$1]))]) 5208 6149 fi 5209 6150 ])dnl … … 5242 6183 ]) 5243 6184 dnl --------------------------------------------------------------------------- 5244 dnl CF_WITH_LIBTOOL version: 19 updated: 2008/03/29 15:46:436185 dnl CF_WITH_LIBTOOL version: 26 updated: 2010/10/23 15:55:24 5245 6186 dnl --------------- 5246 6187 dnl Provide a configure option to incorporate libtool. Define several useful … … 5262 6203 dnl exit 1 5263 6204 dnl fi 5264 dnl 6205 dnl 5265 6206 dnl LOCAL=aclocal.m4 5266 6207 dnl ORIG=aclocal.m4.orig 5267 dnl 6208 dnl 5268 6209 dnl trap "mv $ORIG $LOCAL" 0 1 2 5 15 5269 6210 dnl rm -f $ORIG 5270 6211 dnl mv $LOCAL $ORIG 5271 dnl 6212 dnl 5272 6213 dnl # sed the LIBTOOL= assignment to omit the current directory? 5273 dnl sed -e 's/^LIBTOOL=.*/LIBTOOL=${LIBTOOL -libtool}/' $ACLOCAL/libtool.m4 >>$LOCAL6214 dnl sed -e 's/^LIBTOOL=.*/LIBTOOL=${LIBTOOL:-libtool}/' $ACLOCAL/libtool.m4 >>$LOCAL 5274 6215 dnl cat $ORIG >>$LOCAL 5275 dnl 6216 dnl 5276 6217 dnl autoconf-257 $* 5277 6218 dnl 5278 6219 AC_DEFUN([CF_WITH_LIBTOOL], 5279 6220 [ 6221 AC_REQUIRE([CF_DISABLE_LIBTOOL_VERSION]) 5280 6222 ifdef([AC_PROG_LIBTOOL],,[ 5281 6223 LIBTOOL= … … 5307 6249 # missing_content_AC_PROG_LIBTOOL}} 5308 6250 ],[ 5309 6251 if test "$with_libtool" != "yes" ; then 5310 6252 CF_PATH_SYNTAX(with_libtool) 5311 6253 LIBTOOL=$with_libtool 5312 6254 else 5313 5314 5315 5316 5317 5318 ])dnl 5319 LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'6255 AC_PATH_PROG(LIBTOOL,libtool) 6256 fi 6257 if test -z "$LIBTOOL" ; then 6258 AC_MSG_ERROR(Cannot find libtool) 6259 fi 6260 ])dnl 6261 LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o' 5320 6262 LIB_OBJECT='${OBJECTS:.o=.lo}' 5321 6263 LIB_SUFFIX=.la … … 5332 6274 # Save the version in a cache variable - this is not entirely a good 5333 6275 # thing, but the version string from libtool is very ugly, and for 5334 # bug reports it might be useful to have the original string. 6276 # bug reports it might be useful to have the original string. "(" 5335 6277 cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'` 5336 6278 AC_MSG_RESULT($cf_cv_libtool_version) … … 5339 6281 fi 5340 6282 6283 # special hack to add -no-undefined (which libtool should do for itself) 6284 LT_UNDEF= 6285 case "$cf_cv_system_name" in #(vi 6286 cygwin*|mingw32*|uwin*|aix[[456]]) #(vi 6287 LT_UNDEF=-no-undefined 6288 ;; 6289 esac 6290 AC_SUBST([LT_UNDEF]) 6291 5341 6292 # special hack to add --tag option for C++ compiler 5342 case $cf_cv_libtool_version in 5343 1.[[5-9]]*|[[2-9]] *)6293 case $cf_cv_libtool_version in #(vi 6294 1.[[5-9]]*|[[2-9]].[[0-9.a-z]]*) #(vi 5344 6295 LIBTOOL_CXX="$LIBTOOL --tag=CXX" 5345 6296 LIBTOOL="$LIBTOOL --tag=CC" … … 5373 6324 ])dnl 5374 6325 dnl --------------------------------------------------------------------------- 5375 dnl CF_WITH_PATH version: 8 updated: 2007/05/13 13:16:356326 dnl CF_WITH_PATH version: 10 updated: 2010/10/23 15:44:18 5376 6327 dnl ------------ 5377 6328 dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just … … 5385 6336 dnl 5386 6337 AC_DEFUN([CF_WITH_PATH], 5387 [AC_ARG_WITH($1,[$2 ](default: ifelse( $4,,empty,$4)),,5388 ifelse( $4,,[withval="${$3}"],[withval="${$3-ifelse($5,,$4,$5)}"]))dnl5389 if ifelse( $5,,true,[test -n "$5"]) ; then6338 [AC_ARG_WITH($1,[$2 ](default: ifelse([$4],,empty,[$4])),, 6339 ifelse([$4],,[withval="${$3}"],[withval="${$3:-ifelse([$5],,[$4],[$5])}"]))dnl 6340 if ifelse([$5],,true,[test -n "$5"]) ; then 5390 6341 CF_PATH_SYNTAX(withval) 5391 6342 fi … … 5394 6345 ])dnl 5395 6346 dnl --------------------------------------------------------------------------- 5396 dnl CF_WITH_PATHLIST version: 5 updated: 2001/12/10 01:28:306347 dnl CF_WITH_PATHLIST version: 7 updated: 2010/10/23 16:10:30 5397 6348 dnl ---------------- 5398 6349 dnl Process an option specifying a list of colon-separated paths. … … 5408 6359 AC_REQUIRE([CF_PATHSEP]) 5409 6360 AC_ARG_WITH($1,[$2 ](default: ifelse($4,,empty,$4)),, 5410 ifelse($4,,[withval=${$3}],[withval=${$3 -ifelse($5,,$4,$5)}]))dnl5411 5412 IFS="${IFS = }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"6361 ifelse($4,,[withval=${$3}],[withval=${$3:-ifelse($5,,$4,$5)}]))dnl 6362 6363 IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}" 5413 6364 cf_dst_path= 5414 6365 for cf_src_path in $withval … … 5436 6387 ])dnl 5437 6388 dnl --------------------------------------------------------------------------- 5438 dnl CF_WITH_PTHREAD version: 2 updated: 2008/08/23 18:26:056389 dnl CF_WITH_PTHREAD version: 3 updated: 2010/05/29 16:31:02 5439 6390 dnl --------------- 5440 6391 dnl Check for POSIX thread library. … … 5454 6405 AC_MSG_CHECKING(if we can link with the pthread library) 5455 6406 cf_save_LIBS="$LIBS" 5456 LIBS="-lpthread $LIBS"6407 CF_ADD_LIB(pthread) 5457 6408 AC_TRY_LINK([ 5458 6409 #include <pthread.h> … … 5464 6415 5465 6416 if test "$with_pthread" = yes ; then 5466 LIBS="-lpthread $LIBS"6417 CF_ADD_LIB(pthread) 5467 6418 AC_DEFINE(HAVE_LIBPTHREADS) 5468 6419 else … … 5536 6487 ])dnl 5537 6488 dnl --------------------------------------------------------------------------- 5538 dnl CF_XOPEN_SOURCE version: 26 updated: 2008/07/27 11:26:576489 dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37 5539 6490 dnl --------------- 5540 6491 dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, … … 5547 6498 AC_DEFUN([CF_XOPEN_SOURCE],[ 5548 6499 5549 AC_REQUIRE([CF_PROG_CC_U_D]) 5550 5551 cf_XOPEN_SOURCE=ifelse($1,,500,$1) 5552 cf_POSIX_C_SOURCE=ifelse($2,,199506L,$2) 6500 cf_XOPEN_SOURCE=ifelse([$1],,500,[$1]) 6501 cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2]) 6502 cf_xopen_source= 5553 6503 5554 6504 case $host_os in #(vi 5555 aix[[45]]*) #(vi 5556 CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE" 6505 aix[[456]]*) #(vi 6506 cf_xopen_source="-D_ALL_SOURCE" 6507 ;; 6508 cygwin) #(vi 6509 cf_XOPEN_SOURCE=600 6510 ;; 6511 darwin[[0-8]].*) #(vi 6512 cf_xopen_source="-D_APPLE_C_SOURCE" 6513 ;; 6514 darwin*) #(vi 6515 cf_xopen_source="-D_DARWIN_C_SOURCE" 5557 6516 ;; 5558 6517 freebsd*|dragonfly*) #(vi … … 5562 6521 cf_POSIX_C_SOURCE=200112L 5563 6522 cf_XOPEN_SOURCE=600 5564 CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" 6523 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" 6524 ;; 6525 hpux11*) #(vi 6526 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500" 5565 6527 ;; 5566 6528 hpux*) #(vi 5567 CPPFLAGS="$CPPFLAGS-D_HPUX_SOURCE"6529 cf_xopen_source="-D_HPUX_SOURCE" 5568 6530 ;; 5569 6531 irix[[56]].*) #(vi 5570 CPPFLAGS="$CPPFLAGS-D_SGI_SOURCE"6532 cf_xopen_source="-D_SGI_SOURCE" 5571 6533 ;; 5572 linux*|gnu*| k*bsd*-gnu) #(vi6534 linux*|gnu*|mint*|k*bsd*-gnu) #(vi 5573 6535 CF_GNU_SOURCE 5574 6536 ;; … … 5583 6545 ;; 5584 6546 osf[[45]]*) #(vi 5585 CPPFLAGS="$CPPFLAGS-D_OSF_SOURCE"6547 cf_xopen_source="-D_OSF_SOURCE" 5586 6548 ;; 5587 6549 nto-qnx*) #(vi 5588 CPPFLAGS="$CPPFLAGS-D_QNX_SOURCE"6550 cf_xopen_source="-D_QNX_SOURCE" 5589 6551 ;; 5590 6552 sco*) #(vi 5591 6553 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer 5592 6554 ;; 5593 solaris*) #(vi 5594 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__" 6555 solaris2.1[[0-9]]) #(vi 6556 cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" 6557 ;; 6558 solaris2.[[1-9]]) #(vi 6559 cf_xopen_source="-D__EXTENSIONS__" 5595 6560 ;; 5596 6561 *) … … 5615 6580 CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) 5616 6581 CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) 5617 test "$cf_cv_cc_u_d_options" = yes && \ 5618 CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE" 5619 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source" 6582 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" 6583 CF_ADD_CFLAGS($cf_temp_xopen_source) 5620 6584 fi 5621 6585 CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) 5622 6586 ;; 5623 6587 esac 6588 6589 if test -n "$cf_xopen_source" ; then 6590 CF_ADD_CFLAGS($cf_xopen_source) 6591 fi 5624 6592 ])
Note:
See TracChangeset
for help on using the changeset viewer.