aclocal.m4 (251843) | aclocal.m4 (255852) |
---|---|
1dnl macros used for DIALOG configure script | 1dnl macros used for DIALOG configure script |
2dnl $Id: aclocal.m4,v 1.90 2012/12/02 20:07:30 tom Exp $ | 2dnl $Id: aclocal.m4,v 1.94 2013/09/22 14:26:24 tom Exp $ |
3dnl --------------------------------------------------------------------------- | 3dnl --------------------------------------------------------------------------- |
4dnl Copyright 1999-2011,2012 -- Thomas E. Dickey | 4dnl Copyright 1999-2012,2013 -- Thomas E. Dickey |
5dnl 6dnl Permission is hereby granted, free of charge, to any person obtaining a 7dnl copy of this software and associated documentation files (the 8dnl "Software"), to deal in the Software without restriction, including 9dnl without limitation the rights to use, copy, modify, merge, publish, 10dnl distribute, distribute with modifications, sublicense, and/or sell 11dnl copies of the Software, and to permit persons to whom the Software is 12dnl furnished to do so, subject to the following conditions: --- 572 unchanged lines hidden (view full) --- 585 INSTOBJEXT=.mo 586 AC_SUBST(INSTOBJEXT) 587 588 dnl For backward compatibility. Some Makefiles may be using this. 589 GENCAT=gencat 590 AC_SUBST(GENCAT) 591])dnl 592dnl --------------------------------------------------------------------------- | 5dnl 6dnl Permission is hereby granted, free of charge, to any person obtaining a 7dnl copy of this software and associated documentation files (the 8dnl "Software"), to deal in the Software without restriction, including 9dnl without limitation the rights to use, copy, modify, merge, publish, 10dnl distribute, distribute with modifications, sublicense, and/or sell 11dnl copies of the Software, and to permit persons to whom the Software is 12dnl furnished to do so, subject to the following conditions: --- 572 unchanged lines hidden (view full) --- 585 INSTOBJEXT=.mo 586 AC_SUBST(INSTOBJEXT) 587 588 dnl For backward compatibility. Some Makefiles may be using this. 589 GENCAT=gencat 590 AC_SUBST(GENCAT) 591])dnl 592dnl --------------------------------------------------------------------------- |
593dnl CF_ACVERSION_CHECK version: 3 updated: 2012/10/03 18:39:53 | 593dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56 |
594dnl ------------------ 595dnl Conditionally generate script according to whether we're using a given autoconf. 596dnl 597dnl $1 = version to compare against 598dnl $2 = code to use if AC_ACVERSION is at least as high as $1. 599dnl $3 = code to use if AC_ACVERSION is older than $1. 600define([CF_ACVERSION_CHECK], 601[ | 594dnl ------------------ 595dnl Conditionally generate script according to whether we're using a given autoconf. 596dnl 597dnl $1 = version to compare against 598dnl $2 = code to use if AC_ACVERSION is at least as high as $1. 599dnl $3 = code to use if AC_ACVERSION is older than $1. 600define([CF_ACVERSION_CHECK], 601[ |
602ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl |
|
602ifdef([m4_version_compare], 603[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], 604[CF_ACVERSION_COMPARE( 605AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), 606AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl 607dnl --------------------------------------------------------------------------- 608dnl CF_ACVERSION_COMPARE version: 3 updated: 2012/10/03 18:39:53 609dnl -------------------- --- 510 unchanged lines hidden (view full) --- 1120test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name) 1121 1122if test ".$system_name" != ".$cf_cv_system_name" ; then 1123 AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)) 1124 AC_MSG_ERROR("Please remove config.cache and try again.") 1125fi 1126])dnl 1127dnl --------------------------------------------------------------------------- | 603ifdef([m4_version_compare], 604[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], 605[CF_ACVERSION_COMPARE( 606AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), 607AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl 608dnl --------------------------------------------------------------------------- 609dnl CF_ACVERSION_COMPARE version: 3 updated: 2012/10/03 18:39:53 610dnl -------------------- --- 510 unchanged lines hidden (view full) --- 1121test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name) 1122 1123if test ".$system_name" != ".$cf_cv_system_name" ; then 1124 AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)) 1125 AC_MSG_ERROR("Please remove config.cache and try again.") 1126fi 1127])dnl 1128dnl --------------------------------------------------------------------------- |
1129dnl CF_CHECK_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09 1130dnl ------------------------ 1131dnl Show the version of libtool 1132dnl 1133dnl Save the version in a cache variable - this is not entirely a good thing, 1134dnl but the version string from libtool is very ugly, and for bug reports it 1135dnl might be useful to have the original string. 1136AC_DEFUN([CF_CHECK_LIBTOOL_VERSION],[ 1137if test -n "$LIBTOOL" && test "$LIBTOOL" != none 1138then 1139 AC_MSG_CHECKING(version of $LIBTOOL) 1140 CF_LIBTOOL_VERSION 1141 AC_MSG_RESULT($cf_cv_libtool_version) 1142 if test -z "$cf_cv_libtool_version" ; then 1143 AC_MSG_ERROR(This is not GNU libtool) 1144 fi 1145else 1146 AC_MSG_ERROR(GNU libtool has not been found) 1147fi 1148])dnl 1149dnl --------------------------------------------------------------------------- |
|
1128dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39 1129dnl ----------------- 1130dnl Check if the given compiler is really clang. clang's C driver defines 1131dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does 1132dnl not ignore some gcc options. 1133dnl 1134dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to 1135dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from --- 152 unchanged lines hidden (view full) --- 1288if test "$cf_cv_ncurses_header" = none ; then 1289 AC_MSG_ERROR(No curses header-files found) 1290fi 1291 1292# cheat, to get the right #define's for HAVE_NCURSES_H, etc. 1293AC_CHECK_HEADERS($cf_cv_ncurses_header) 1294])dnl 1295dnl --------------------------------------------------------------------------- | 1150dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39 1151dnl ----------------- 1152dnl Check if the given compiler is really clang. clang's C driver defines 1153dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does 1154dnl not ignore some gcc options. 1155dnl 1156dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to 1157dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from --- 152 unchanged lines hidden (view full) --- 1310if test "$cf_cv_ncurses_header" = none ; then 1311 AC_MSG_ERROR(No curses header-files found) 1312fi 1313 1314# cheat, to get the right #define's for HAVE_NCURSES_H, etc. 1315AC_CHECK_HEADERS($cf_cv_ncurses_header) 1316])dnl 1317dnl --------------------------------------------------------------------------- |
1296dnl CF_CURSES_LIBS version: 36 updated: 2012/07/07 21:02:48 | 1318dnl CF_CURSES_LIBS version: 37 updated: 2013/02/09 17:33:50 |
1297dnl -------------- 1298dnl Look for the curses libraries. Older curses implementations may require 1299dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. 1300AC_DEFUN([CF_CURSES_LIBS],[ 1301 1302AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl 1303AC_MSG_CHECKING(if we have identified curses libraries) 1304AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], --- 20 unchanged lines hidden (view full) --- 1325 ],[ 1326 AC_CHECK_LIB(Hcurses,initscr,[ 1327 # HP's header uses __HP_CURSES, but user claims _HP_CURSES. 1328 CF_ADD_LIBS(-lHcurses) 1329 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES" 1330 ac_cv_func_initscr=yes 1331 ])]) 1332 fi | 1319dnl -------------- 1320dnl Look for the curses libraries. Older curses implementations may require 1321dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. 1322AC_DEFUN([CF_CURSES_LIBS],[ 1323 1324AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl 1325AC_MSG_CHECKING(if we have identified curses libraries) 1326AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], --- 20 unchanged lines hidden (view full) --- 1347 ],[ 1348 AC_CHECK_LIB(Hcurses,initscr,[ 1349 # HP's header uses __HP_CURSES, but user claims _HP_CURSES. 1350 CF_ADD_LIBS(-lHcurses) 1351 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES" 1352 ac_cv_func_initscr=yes 1353 ])]) 1354 fi |
1333 ;; | 1355 ;; |
1334linux*) 1335 case `arch 2>/dev/null` in 1336 x86_64) 1337 if test -d /lib64 1338 then 1339 CF_ADD_LIBDIR(/lib64) 1340 else 1341 CF_ADD_LIBDIR(/lib) 1342 fi 1343 ;; 1344 *) 1345 CF_ADD_LIBDIR(/lib) 1346 ;; 1347 esac | 1356linux*) 1357 case `arch 2>/dev/null` in 1358 x86_64) 1359 if test -d /lib64 1360 then 1361 CF_ADD_LIBDIR(/lib64) 1362 else 1363 CF_ADD_LIBDIR(/lib) 1364 fi 1365 ;; 1366 *) 1367 CF_ADD_LIBDIR(/lib) 1368 ;; 1369 esac |
1348 ;; | 1370 ;; |
1349sunos3*|sunos4*) 1350 if test "x$cf_cv_screen" = "xcurses_5lib" 1351 then 1352 if test -d /usr/5lib ; then 1353 CF_ADD_LIBDIR(/usr/5lib) 1354 CF_ADD_LIBS(-lcurses -ltermcap) 1355 fi 1356 fi 1357 ac_cv_func_initscr=yes 1358 ;; 1359esac 1360 1361if test ".$ac_cv_func_initscr" != .yes ; then | 1371sunos3*|sunos4*) 1372 if test "x$cf_cv_screen" = "xcurses_5lib" 1373 then 1374 if test -d /usr/5lib ; then 1375 CF_ADD_LIBDIR(/usr/5lib) 1376 CF_ADD_LIBS(-lcurses -ltermcap) 1377 fi 1378 fi 1379 ac_cv_func_initscr=yes 1380 ;; 1381esac 1382 1383if test ".$ac_cv_func_initscr" != .yes ; then |
1362 cf_save_LIBS="$LIBS" 1363 cf_term_lib="" 1364 cf_curs_lib="" | 1384 cf_save_LIBS="$LIBS" |
1365 | 1385 |
1366 if test ".${cf_cv_ncurses_version:-no}" != .no 1367 then 1368 cf_check_list="ncurses curses cursesX" 1369 else 1370 cf_check_list="cursesX curses ncurses" 1371 fi | 1386 if test ".${cf_cv_ncurses_version:-no}" != .no 1387 then 1388 cf_check_list="ncurses curses cursesX" 1389 else 1390 cf_check_list="cursesX curses ncurses" 1391 fi |
1372 | 1392 |
1373 # Check for library containing tgoto. Do this before curses library 1374 # because it may be needed to link the test-case for initscr. 1375 AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ 1376 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown 1377 do 1378 AC_CHECK_LIB($cf_term_lib,tgoto,[break]) 1379 done 1380 ]) | 1393 # Check for library containing tgoto. Do this before curses library 1394 # because it may be needed to link the test-case for initscr. 1395 if test "x$cf_term_lib" = x 1396 then 1397 AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ 1398 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown 1399 do 1400 AC_CHECK_LIB($cf_term_lib,tgoto,[break]) 1401 done 1402 ]) 1403 fi |
1381 | 1404 |
1382 # Check for library containing initscr 1383 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" 1384 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown 1385 do 1386 AC_CHECK_LIB($cf_curs_lib,initscr,[break]) 1387 done 1388 test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found) | 1405 # Check for library containing initscr 1406 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" 1407 if test "x$cf_curs_lib" = x 1408 then 1409 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown 1410 do 1411 AC_CHECK_LIB($cf_curs_lib,initscr,[break]) 1412 done 1413 fi 1414 test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found) |
1389 | 1415 |
1390 LIBS="-l$cf_curs_lib $cf_save_LIBS" 1391 if test "$cf_term_lib" = unknown ; then 1392 AC_MSG_CHECKING(if we can link with $cf_curs_lib library) 1393 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], 1394 [initscr()], 1395 [cf_result=yes], 1396 [cf_result=no]) 1397 AC_MSG_RESULT($cf_result) 1398 test $cf_result = no && AC_MSG_ERROR(Cannot link curses library) 1399 elif test "$cf_curs_lib" = "$cf_term_lib" ; then 1400 : 1401 elif test "$cf_term_lib" != predefined ; then 1402 AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) 1403 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], 1404 [initscr(); tgoto((char *)0, 0, 0);], 1405 [cf_result=no], 1406 [ 1407 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" 1408 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], 1409 [initscr()], 1410 [cf_result=yes], 1411 [cf_result=error]) 1412 ]) 1413 AC_MSG_RESULT($cf_result) 1414 fi | 1416 LIBS="-l$cf_curs_lib $cf_save_LIBS" 1417 if test "$cf_term_lib" = unknown ; then 1418 AC_MSG_CHECKING(if we can link with $cf_curs_lib library) 1419 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], 1420 [initscr()], 1421 [cf_result=yes], 1422 [cf_result=no]) 1423 AC_MSG_RESULT($cf_result) 1424 test $cf_result = no && AC_MSG_ERROR(Cannot link curses library) 1425 elif test "$cf_curs_lib" = "$cf_term_lib" ; then 1426 : 1427 elif test "$cf_term_lib" != predefined ; then 1428 AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) 1429 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], 1430 [initscr(); tgoto((char *)0, 0, 0);], 1431 [cf_result=no], 1432 [ 1433 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" 1434 AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], 1435 [initscr()], 1436 [cf_result=yes], 1437 [cf_result=error]) 1438 ]) 1439 AC_MSG_RESULT($cf_result) 1440 fi |
1415fi 1416fi 1417 1418])dnl 1419dnl --------------------------------------------------------------------------- 1420dnl CF_CURSES_TERM_H version: 10 updated: 2012/10/06 08:57:51 1421dnl ---------------- 1422dnl SVr4 curses should have term.h as well (where it puts the definitions of --- 280 unchanged lines hidden (view full) --- 1703 [cf_disable_rpath_hack=yes], 1704 [cf_disable_rpath_hack=no]) 1705AC_MSG_RESULT($cf_disable_rpath_hack) 1706if test "$cf_disable_rpath_hack" = no ; then 1707 CF_RPATH_HACK 1708fi 1709]) 1710dnl --------------------------------------------------------------------------- | 1441fi 1442fi 1443 1444])dnl 1445dnl --------------------------------------------------------------------------- 1446dnl CF_CURSES_TERM_H version: 10 updated: 2012/10/06 08:57:51 1447dnl ---------------- 1448dnl SVr4 curses should have term.h as well (where it puts the definitions of --- 280 unchanged lines hidden (view full) --- 1729 [cf_disable_rpath_hack=yes], 1730 [cf_disable_rpath_hack=no]) 1731AC_MSG_RESULT($cf_disable_rpath_hack) 1732if test "$cf_disable_rpath_hack" = no ; then 1733 CF_RPATH_HACK 1734fi 1735]) 1736dnl --------------------------------------------------------------------------- |
1737dnl CF_ENABLE_RPATH version: 2 updated: 2010/03/27 18:39:42 1738dnl --------------- 1739dnl Check if the rpath option should be used, setting cache variable 1740dnl cf_cv_enable_rpath if so. 1741AC_DEFUN([CF_ENABLE_RPATH], 1742[ 1743AC_MSG_CHECKING(if rpath option should be used) 1744AC_ARG_ENABLE(rpath, 1745[ --enable-rpath use rpath option when generating shared libraries], 1746[cf_cv_enable_rpath=$enableval], 1747[cf_cv_enable_rpath=no]) 1748AC_MSG_RESULT($cf_cv_enable_rpath) 1749])dnl 1750dnl --------------------------------------------------------------------------- |
|
1711dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54 1712dnl --------------- 1713dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We 1714dnl prefer a standard location, and use -L options only if we do not find the 1715dnl library in the standard library location(s). 1716dnl $1 = library name 1717dnl $2 = library class, usually the same as library name 1718dnl $3 = includes --- 164 unchanged lines hidden (view full) --- 1883 CF_ADD_LIBDIR($cf_cv_library_path_$3) 1884 CF_ADD_LIB($3) 1885],[$4]) 1886else 1887ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5]) 1888fi 1889])dnl 1890dnl --------------------------------------------------------------------------- | 1751dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54 1752dnl --------------- 1753dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We 1754dnl prefer a standard location, and use -L options only if we do not find the 1755dnl library in the standard library location(s). 1756dnl $1 = library name 1757dnl $2 = library class, usually the same as library name 1758dnl $3 = includes --- 164 unchanged lines hidden (view full) --- 1923 CF_ADD_LIBDIR($cf_cv_library_path_$3) 1924 CF_ADD_LIB($3) 1925],[$4]) 1926else 1927ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5]) 1928fi 1929])dnl 1930dnl --------------------------------------------------------------------------- |
1931dnl CF_FORGET_TOOL version: 1 updated: 2013/04/06 18:03:09 1932dnl -------------- 1933dnl Forget that we saw the given tool. 1934AC_DEFUN([CF_FORGET_TOOL],[ 1935unset ac_cv_prog_ac_ct_$1 1936unset ac_ct_$1 1937unset $1 1938])dnl 1939dnl --------------------------------------------------------------------------- |
|
1891dnl CF_FUNC_WAIT version: 3 updated: 2012/10/06 08:57:51 1892dnl ------------ 1893dnl Test for the presence of <sys/wait.h>, 'union wait', arg-type of 'wait()' 1894dnl and/or 'waitpid()'. 1895dnl 1896dnl Note that we cannot simply grep for 'union wait' in the wait.h file, 1897dnl because some Posix systems turn this on only when a BSD variable is 1898dnl defined. --- 352 unchanged lines hidden (view full) --- 2251test -d "$oldincludedir" && { 2252 test -d $oldincludedir && $1="[$]$1 $oldincludedir" 2253 test -d $oldincludedir/$2 && $1="[$]$1 $oldincludedir/$2" 2254} 2255 2256$1="[$]$1 $cf_header_path_list" 2257])dnl 2258dnl --------------------------------------------------------------------------- | 1940dnl CF_FUNC_WAIT version: 3 updated: 2012/10/06 08:57:51 1941dnl ------------ 1942dnl Test for the presence of <sys/wait.h>, 'union wait', arg-type of 'wait()' 1943dnl and/or 'waitpid()'. 1944dnl 1945dnl Note that we cannot simply grep for 'union wait' in the wait.h file, 1946dnl because some Posix systems turn this on only when a BSD variable is 1947dnl defined. --- 352 unchanged lines hidden (view full) --- 2300test -d "$oldincludedir" && { 2301 test -d $oldincludedir && $1="[$]$1 $oldincludedir" 2302 test -d $oldincludedir/$2 && $1="[$]$1 $oldincludedir/$2" 2303} 2304 2305$1="[$]$1 $cf_header_path_list" 2306])dnl 2307dnl --------------------------------------------------------------------------- |
2259dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42 | 2308dnl CF_INTEL_COMPILER version: 5 updated: 2013/02/10 10:41:05 |
2260dnl ----------------- 2261dnl Check if the given compiler is really the Intel compiler for Linux. It 2262dnl tries to imitate gcc, but does not return an error when it finds a mismatch 2263dnl between prototypes, e.g., as exercised by CF_MISSING_CHECK. 2264dnl 2265dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to 2266dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from 2267dnl the wrappers for gcc and g++ warnings. 2268dnl 2269dnl $1 = GCC (default) or GXX 2270dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS 2271dnl $3 = CFLAGS (default) or CXXFLAGS 2272AC_DEFUN([CF_INTEL_COMPILER],[ | 2309dnl ----------------- 2310dnl Check if the given compiler is really the Intel compiler for Linux. It 2311dnl tries to imitate gcc, but does not return an error when it finds a mismatch 2312dnl between prototypes, e.g., as exercised by CF_MISSING_CHECK. 2313dnl 2314dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to 2315dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from 2316dnl the wrappers for gcc and g++ warnings. 2317dnl 2318dnl $1 = GCC (default) or GXX 2319dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS 2320dnl $3 = CFLAGS (default) or CXXFLAGS 2321AC_DEFUN([CF_INTEL_COMPILER],[ |
2322AC_REQUIRE([AC_CANONICAL_HOST]) |
|
2273ifelse([$2],,INTEL_COMPILER,[$2])=no 2274 2275if test "$ifelse([$1],,[$1],GCC)" = yes ; then 2276 case $host_os in 2277 linux*|gnu*) 2278 AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler) 2279 cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])" 2280 ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc" --- 129 unchanged lines hidden (view full) --- 2410 done 2411fi 2412 2413CF_SUBDIR_PATH($1,$2,lib) 2414 2415$1="$cf_library_path_list [$]$1" 2416])dnl 2417dnl --------------------------------------------------------------------------- | 2323ifelse([$2],,INTEL_COMPILER,[$2])=no 2324 2325if test "$ifelse([$1],,[$1],GCC)" = yes ; then 2326 case $host_os in 2327 linux*|gnu*) 2328 AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler) 2329 cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])" 2330 ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc" --- 129 unchanged lines hidden (view full) --- 2460 done 2461fi 2462 2463CF_SUBDIR_PATH($1,$2,lib) 2464 2465$1="$cf_library_path_list [$]$1" 2466])dnl 2467dnl --------------------------------------------------------------------------- |
2468dnl CF_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09 2469dnl ------------------ 2470AC_DEFUN([CF_LIBTOOL_VERSION],[ 2471if test -n "$LIBTOOL" && test "$LIBTOOL" != none 2472then 2473 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.]].*//'` 2474else 2475 cf_cv_libtool_version= 2476fi 2477test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version 2478])dnl 2479dnl --------------------------------------------------------------------------- |
|
2418dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10 2419dnl ------------- 2420dnl Compute the library-prefix for the given host system 2421dnl $1 = variable to set 2422define([CF_LIB_PREFIX], 2423[ 2424 case $cf_cv_system_name in #(vi 2425 OS/2*|os2*) #(vi 2426 LIB_PREFIX='' 2427 ;; 2428 *) LIB_PREFIX='lib' 2429 ;; 2430 esac 2431ifelse($1,,,[$1=$LIB_PREFIX]) 2432 AC_SUBST(LIB_PREFIX) 2433])dnl 2434dnl --------------------------------------------------------------------------- | 2480dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10 2481dnl ------------- 2482dnl Compute the library-prefix for the given host system 2483dnl $1 = variable to set 2484define([CF_LIB_PREFIX], 2485[ 2486 case $cf_cv_system_name in #(vi 2487 OS/2*|os2*) #(vi 2488 LIB_PREFIX='' 2489 ;; 2490 *) LIB_PREFIX='lib' 2491 ;; 2492 esac 2493ifelse($1,,,[$1=$LIB_PREFIX]) 2494 AC_SUBST(LIB_PREFIX) 2495])dnl 2496dnl --------------------------------------------------------------------------- |
2497dnl CF_LIB_SUFFIX version: 22 updated: 2013/09/07 13:54:05 2498dnl ------------- 2499dnl Compute the library file-suffix from the given model name 2500dnl $1 = model name 2501dnl $2 = variable to set (the nominal library suffix) 2502dnl $3 = dependency variable to set (actual filename) 2503dnl The variable $LIB_SUFFIX, if set, prepends the variable to set. 2504AC_DEFUN([CF_LIB_SUFFIX], 2505[ 2506 case X$1 in #(vi 2507 Xlibtool) #(vi 2508 $2='.la' 2509 $3=[$]$2 2510 ;; 2511 Xdebug) #(vi 2512 $2='_g.a' 2513 $3=[$]$2 2514 ;; 2515 Xprofile) #(vi 2516 $2='_p.a' 2517 $3=[$]$2 2518 ;; 2519 Xshared) #(vi 2520 case $cf_cv_system_name in 2521 aix[[5-7]]*) #(vi 2522 $2='.a' 2523 $3=[$]$2 2524 ;; 2525 cygwin*|msys*|mingw*) #(vi 2526 $2='.dll' 2527 $3='.dll.a' 2528 ;; 2529 darwin*) #(vi 2530 $2='.dylib' 2531 $3=[$]$2 2532 ;; 2533 hpux*) #(vi 2534 case $target in 2535 ia64*) #(vi 2536 $2='.so' 2537 $3=[$]$2 2538 ;; 2539 *) #(vi 2540 $2='.sl' 2541 $3=[$]$2 2542 ;; 2543 esac 2544 ;; 2545 *) #(vi 2546 $2='.so' 2547 $3=[$]$2 2548 ;; 2549 esac 2550 ;; 2551 *) 2552 $2='.a' 2553 $3=[$]$2 2554 ;; 2555 esac 2556 test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}" 2557 test -n "$LIB_SUFFIX" && $3="${LIB_SUFFIX}[$]{$3}" 2558])dnl 2559dnl --------------------------------------------------------------------------- |
|
2435dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46 2436dnl ------------ 2437dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make' 2438dnl options to lower-levels. It's very useful for "make -n" -- if we have it. 2439dnl (GNU 'make' does both, something POSIX 'make', which happens to make the 2440dnl ${MAKEFLAGS} variable incompatible because it adds the assignments :-) 2441AC_DEFUN([CF_MAKEFLAGS], 2442[ --- 121 unchanged lines hidden (view full) --- 2564 AC_DEFINE(NEED_WCHAR_H,1,[Define to 1 if we must include wchar.h]) 2565fi 2566 2567if test "$cf_cv_mbstate_t" != unknown ; then 2568 AC_DEFINE(HAVE_MBSTATE_T,1,[Define to 1 if mbstate_t is declared]) 2569fi 2570])dnl 2571dnl --------------------------------------------------------------------------- | 2560dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46 2561dnl ------------ 2562dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make' 2563dnl options to lower-levels. It's very useful for "make -n" -- if we have it. 2564dnl (GNU 'make' does both, something POSIX 'make', which happens to make the 2565dnl ${MAKEFLAGS} variable incompatible because it adds the assignments :-) 2566AC_DEFUN([CF_MAKEFLAGS], 2567[ --- 121 unchanged lines hidden (view full) --- 2689 AC_DEFINE(NEED_WCHAR_H,1,[Define to 1 if we must include wchar.h]) 2690fi 2691 2692if test "$cf_cv_mbstate_t" != unknown ; then 2693 AC_DEFINE(HAVE_MBSTATE_T,1,[Define to 1 if mbstate_t is declared]) 2694fi 2695])dnl 2696dnl --------------------------------------------------------------------------- |
2572dnl CF_MIXEDCASE_FILENAMES version: 4 updated: 2012/10/02 20:55:03 | 2697dnl CF_MIXEDCASE_FILENAMES version: 5 updated: 2013/09/07 13:54:05 |
2573dnl ---------------------- 2574dnl Check if the file-system supports mixed-case filenames. If we're able to 2575dnl create a lowercase name and see it as uppercase, it doesn't support that. 2576AC_DEFUN([CF_MIXEDCASE_FILENAMES], 2577[ 2578AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[ 2579if test "$cross_compiling" = yes ; then 2580 case $target_alias in #(vi | 2698dnl ---------------------- 2699dnl Check if the file-system supports mixed-case filenames. If we're able to 2700dnl create a lowercase name and see it as uppercase, it doesn't support that. 2701AC_DEFUN([CF_MIXEDCASE_FILENAMES], 2702[ 2703AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[ 2704if test "$cross_compiling" = yes ; then 2705 case $target_alias in #(vi |
2581 *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi | 2706 *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw32*|*-uwin*) #(vi |
2582 cf_cv_mixedcase=no 2583 ;; 2584 *) 2585 cf_cv_mixedcase=yes 2586 ;; 2587 esac 2588else 2589 rm -f conftest CONFTEST --- 364 unchanged lines hidden (view full) --- 2954 *) 2955 CF_ADD_CFLAGS([-g]) 2956 ;; 2957 esac 2958 ;; 2959esac 2960])dnl 2961dnl --------------------------------------------------------------------------- | 2707 cf_cv_mixedcase=no 2708 ;; 2709 *) 2710 cf_cv_mixedcase=yes 2711 ;; 2712 esac 2713else 2714 rm -f conftest CONFTEST --- 364 unchanged lines hidden (view full) --- 3079 *) 3080 CF_ADD_CFLAGS([-g]) 3081 ;; 3082 esac 3083 ;; 3084esac 3085])dnl 3086dnl --------------------------------------------------------------------------- |
3087dnl CF_NUMBER_SYNTAX version: 1 updated: 2003/09/20 18:12:49 3088dnl ---------------- 3089dnl Check if the given variable is a number. If not, report an error. 3090dnl $1 is the variable 3091dnl $2 is the message 3092AC_DEFUN([CF_NUMBER_SYNTAX],[ 3093if test -n "$1" ; then 3094 case $1 in #(vi 3095 [[0-9]]*) #(vi 3096 ;; 3097 *) 3098 AC_MSG_ERROR($2 is not a number: $1) 3099 ;; 3100 esac 3101else 3102 AC_MSG_ERROR($2 value is empty) 3103fi 3104])dnl 3105dnl --------------------------------------------------------------------------- |
|
2962dnl CF_OUR_MESSAGES version: 7 updated: 2004/09/12 19:45:55 2963dnl --------------- 2964dnl Check if we use the messages included with this program 2965dnl 2966dnl $1 specifies either Makefile or makefile, defaulting to the former. 2967dnl 2968dnl Sets variables which can be used to substitute in makefiles: 2969dnl MSG_DIR_MAKE - to make ./po directory --- 74 unchanged lines hidden (view full) --- 3044 $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%` 3045 ;; 3046*) 3047 ifelse([$2],,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2) 3048 ;; 3049esac 3050])dnl 3051dnl --------------------------------------------------------------------------- | 3106dnl CF_OUR_MESSAGES version: 7 updated: 2004/09/12 19:45:55 3107dnl --------------- 3108dnl Check if we use the messages included with this program 3109dnl 3110dnl $1 specifies either Makefile or makefile, defaulting to the former. 3111dnl 3112dnl Sets variables which can be used to substitute in makefiles: 3113dnl MSG_DIR_MAKE - to make ./po directory --- 74 unchanged lines hidden (view full) --- 3188 $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%` 3189 ;; 3190*) 3191 ifelse([$2],,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2) 3192 ;; 3193esac 3194])dnl 3195dnl --------------------------------------------------------------------------- |
3196dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22 3197dnl ------------- 3198dnl Check for the package-config program, unless disabled by command-line. 3199AC_DEFUN([CF_PKG_CONFIG], 3200[ 3201AC_MSG_CHECKING(if you want to use pkg-config) 3202AC_ARG_WITH(pkg-config, 3203 [ --with-pkg-config{=path} enable/disable use of pkg-config], 3204 [cf_pkg_config=$withval], 3205 [cf_pkg_config=yes]) 3206AC_MSG_RESULT($cf_pkg_config) 3207 3208case $cf_pkg_config in #(vi 3209no) #(vi 3210 PKG_CONFIG=none 3211 ;; 3212yes) #(vi 3213 CF_ACVERSION_CHECK(2.52, 3214 [AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)], 3215 [AC_PATH_PROG(PKG_CONFIG, pkg-config, none)]) 3216 ;; 3217*) 3218 PKG_CONFIG=$withval 3219 ;; 3220esac 3221 3222test -z "$PKG_CONFIG" && PKG_CONFIG=none 3223if test "$PKG_CONFIG" != none ; then 3224 CF_PATH_SYNTAX(PKG_CONFIG) 3225fi 3226 3227AC_SUBST(PKG_CONFIG) 3228])dnl 3229dnl --------------------------------------------------------------------------- |
|
3052dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42 3053dnl ----------------- 3054dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. 3055dnl 3056dnl POSIX.1-1990 _POSIX_SOURCE 3057dnl POSIX.1-1990 and _POSIX_SOURCE and 3058dnl POSIX.2-1992 C-Language _POSIX_C_SOURCE=2 3059dnl Bindings Option --- 103 unchanged lines hidden (view full) --- 3163dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14 3164dnl ------------ 3165AC_DEFUN([CF_PROG_LINT], 3166[ 3167AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint) 3168AC_SUBST(LINT_OPTS) 3169])dnl 3170dnl --------------------------------------------------------------------------- | 3230dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42 3231dnl ----------------- 3232dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. 3233dnl 3234dnl POSIX.1-1990 _POSIX_SOURCE 3235dnl POSIX.1-1990 and _POSIX_SOURCE and 3236dnl POSIX.2-1992 C-Language _POSIX_C_SOURCE=2 3237dnl Bindings Option --- 103 unchanged lines hidden (view full) --- 3341dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14 3342dnl ------------ 3343AC_DEFUN([CF_PROG_LINT], 3344[ 3345AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint) 3346AC_SUBST(LINT_OPTS) 3347])dnl 3348dnl --------------------------------------------------------------------------- |
3349dnl CF_PROG_LN_S version: 2 updated: 2010/08/14 18:25:37 3350dnl ------------ 3351dnl Combine checks for "ln -s" and "ln -sf", updating $LN_S to include "-f" 3352dnl option if it is supported. 3353AC_DEFUN([CF_PROG_LN_S],[ 3354AC_PROG_LN_S 3355AC_MSG_CHECKING(if $LN_S -f options work) 3356 3357rm -f conf$$.src conf$$dst 3358echo >conf$$.dst 3359echo first >conf$$.src 3360if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then 3361 cf_prog_ln_sf=yes 3362else 3363 cf_prog_ln_sf=no 3364fi 3365rm -f conf$$.dst conf$$src 3366AC_MSG_RESULT($cf_prog_ln_sf) 3367 3368test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f" 3369])dnl 3370dnl --------------------------------------------------------------------------- |
|
3171dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 3172dnl ---------------- 3173dnl Remove all -U and -D options that refer to the given symbol from a list 3174dnl of C compiler options. This works around the problem that not all 3175dnl compilers process -U and -D options from left-to-right, so a -U option 3176dnl cannot be used to cancel the effect of a preceding -D option. 3177dnl 3178dnl $1 = target (which could be the same as the source variable) 3179dnl $2 = source (including '$') 3180dnl $3 = symbol to remove 3181define([CF_REMOVE_DEFINE], 3182[ 3183$1=`echo "$2" | \ 3184 sed -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[[ ]]/ /g' \ 3185 -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'` 3186])dnl 3187dnl --------------------------------------------------------------------------- | 3371dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 3372dnl ---------------- 3373dnl Remove all -U and -D options that refer to the given symbol from a list 3374dnl of C compiler options. This works around the problem that not all 3375dnl compilers process -U and -D options from left-to-right, so a -U option 3376dnl cannot be used to cancel the effect of a preceding -D option. 3377dnl 3378dnl $1 = target (which could be the same as the source variable) 3379dnl $2 = source (including '$') 3380dnl $3 = symbol to remove 3381define([CF_REMOVE_DEFINE], 3382[ 3383$1=`echo "$2" | \ 3384 sed -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[[ ]]/ /g' \ 3385 -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'` 3386])dnl 3387dnl --------------------------------------------------------------------------- |
3188dnl CF_RPATH_HACK version: 9 updated: 2011/02/13 13:31:33 | 3388dnl CF_RPATH_HACK version: 11 updated: 2013/09/01 13:02:00 |
3189dnl ------------- 3190AC_DEFUN([CF_RPATH_HACK], 3191[ 3192AC_REQUIRE([CF_LD_RPATH_OPT]) 3193AC_MSG_CHECKING(for updated LDFLAGS) 3194if test -n "$LD_RPATH_OPT" ; then 3195 AC_MSG_RESULT(maybe) 3196 3197 AC_CHECK_PROGS(cf_ldd_prog,ldd,no) 3198 cf_rpath_list="/usr/lib /lib" 3199 if test "$cf_ldd_prog" != no 3200 then 3201 cf_rpath_oops= 3202 3203AC_TRY_LINK([#include <stdio.h>], 3204 [printf("Hello");], | 3389dnl ------------- 3390AC_DEFUN([CF_RPATH_HACK], 3391[ 3392AC_REQUIRE([CF_LD_RPATH_OPT]) 3393AC_MSG_CHECKING(for updated LDFLAGS) 3394if test -n "$LD_RPATH_OPT" ; then 3395 AC_MSG_RESULT(maybe) 3396 3397 AC_CHECK_PROGS(cf_ldd_prog,ldd,no) 3398 cf_rpath_list="/usr/lib /lib" 3399 if test "$cf_ldd_prog" != no 3400 then 3401 cf_rpath_oops= 3402 3403AC_TRY_LINK([#include <stdio.h>], 3404 [printf("Hello");], |
3205 [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u` 3206 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort -u`]) | 3405 [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq` 3406 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort | uniq`]) |
3207 3208 # If we passed the link-test, but get a "not found" on a given library, 3209 # this could be due to inept reconfiguration of gcc to make it only 3210 # partly honor /usr/local/lib (or whatever). Sometimes this behavior 3211 # is intentional, e.g., installing gcc in /usr/bin and suppressing the 3212 # /usr/local libraries. 3213 if test -n "$cf_rpath_oops" 3214 then --- 16 unchanged lines hidden (view full) --- 3231 fi 3232 3233 CF_VERBOSE(...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS) 3234 3235 CF_RPATH_HACK_2(LDFLAGS) 3236 CF_RPATH_HACK_2(LIBS) 3237 3238 CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS) | 3407 3408 # If we passed the link-test, but get a "not found" on a given library, 3409 # this could be due to inept reconfiguration of gcc to make it only 3410 # partly honor /usr/local/lib (or whatever). Sometimes this behavior 3411 # is intentional, e.g., installing gcc in /usr/bin and suppressing the 3412 # /usr/local libraries. 3413 if test -n "$cf_rpath_oops" 3414 then --- 16 unchanged lines hidden (view full) --- 3431 fi 3432 3433 CF_VERBOSE(...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS) 3434 3435 CF_RPATH_HACK_2(LDFLAGS) 3436 CF_RPATH_HACK_2(LIBS) 3437 3438 CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS) |
3439else 3440 AC_MSG_RESULT(no) |
|
3239fi 3240AC_SUBST(EXTRA_LDFLAGS) 3241])dnl 3242dnl --------------------------------------------------------------------------- 3243dnl CF_RPATH_HACK_2 version: 6 updated: 2010/04/17 16:31:24 3244dnl --------------- 3245dnl Do one set of substitutions for CF_RPATH_HACK, adding an rpath option to 3246dnl EXTRA_LDFLAGS for each -L option found. --- 48 unchanged lines hidden (view full) --- 3295 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src" 3296done 3297$1=$cf_rpath_dst 3298 3299CF_VERBOSE(...checked $1 [$]$1) 3300AC_SUBST(EXTRA_LDFLAGS) 3301])dnl 3302dnl --------------------------------------------------------------------------- | 3441fi 3442AC_SUBST(EXTRA_LDFLAGS) 3443])dnl 3444dnl --------------------------------------------------------------------------- 3445dnl CF_RPATH_HACK_2 version: 6 updated: 2010/04/17 16:31:24 3446dnl --------------- 3447dnl Do one set of substitutions for CF_RPATH_HACK, adding an rpath option to 3448dnl EXTRA_LDFLAGS for each -L option found. --- 48 unchanged lines hidden (view full) --- 3497 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src" 3498done 3499$1=$cf_rpath_dst 3500 3501CF_VERBOSE(...checked $1 [$]$1) 3502AC_SUBST(EXTRA_LDFLAGS) 3503])dnl 3504dnl --------------------------------------------------------------------------- |
3505dnl CF_SHARED_OPTS version: 83 updated: 2013/09/21 17:34:53 3506dnl -------------- 3507dnl -------------- 3508dnl Attempt to determine the appropriate CC/LD options for creating a shared 3509dnl library. 3510dnl 3511dnl Notes: 3512dnl a) ${LOCAL_LDFLAGS} is used to link executables that will run within 3513dnl the build-tree, i.e., by making use of the libraries that are compiled in 3514dnl $rel_builddir/lib We avoid compiling-in a $rel_builddir/lib path for the 3515dnl shared library since that can lead to unexpected results at runtime. 3516dnl b) ${LOCAL_LDFLAGS2} has the same intention but assumes that the shared 3517dnl libraries are compiled in ../../lib 3518dnl 3519dnl The variable 'cf_cv_do_symlinks' is used to control whether we configure 3520dnl to install symbolic links to the rel/abi versions of shared libraries. 3521dnl 3522dnl The variable 'cf_cv_shlib_version' controls whether we use the rel or abi 3523dnl version when making symbolic links. 3524dnl 3525dnl The variable 'cf_cv_shlib_version_infix' controls whether shared library 3526dnl version numbers are infix (ex: libncurses.<ver>.dylib) or postfix 3527dnl (ex: libncurses.so.<ver>). 3528dnl 3529dnl Some loaders leave 'so_locations' lying around. It's nice to clean up. 3530AC_DEFUN([CF_SHARED_OPTS], 3531[ 3532 AC_REQUIRE([CF_LD_RPATH_OPT]) 3533 RM_SHARED_OPTS= 3534 LOCAL_LDFLAGS= 3535 LOCAL_LDFLAGS2= 3536 LD_SHARED_OPTS= 3537 INSTALL_LIB="-m 644" 3538 : ${rel_builddir:=.} 3539 3540 cf_cv_do_symlinks=no 3541 cf_ld_rpath_opt= 3542 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT" 3543 3544 AC_MSG_CHECKING(if release/abi version should be used for shared libs) 3545 AC_ARG_WITH(shlib-version, 3546 [ --with-shlib-version=X Specify rel or abi version for shared libs], 3547 [test -z "$withval" && withval=auto 3548 case $withval in #(vi 3549 yes) #(vi 3550 cf_cv_shlib_version=auto 3551 ;; 3552 rel|abi|auto|no) #(vi 3553 cf_cv_shlib_version=$withval 3554 ;; 3555 *) 3556 AC_MSG_ERROR([option value must be one of: rel, abi, auto or no]) 3557 ;; 3558 esac 3559 ],[cf_cv_shlib_version=auto]) 3560 AC_MSG_RESULT($cf_cv_shlib_version) 3561 3562 cf_cv_rm_so_locs=no 3563 cf_try_cflags= 3564 3565 # Some less-capable ports of gcc support only -fpic 3566 CC_SHARED_OPTS= 3567 if test "$GCC" = yes 3568 then 3569 AC_MSG_CHECKING(which $CC option to use) 3570 cf_save_CFLAGS="$CFLAGS" 3571 for CC_SHARED_OPTS in -fPIC -fpic '' 3572 do 3573 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS" 3574 AC_TRY_COMPILE([#include <stdio.h>],[int x = 1],[break],[]) 3575 done 3576 AC_MSG_RESULT($CC_SHARED_OPTS) 3577 CFLAGS="$cf_save_CFLAGS" 3578 fi 3579 3580 cf_cv_shlib_version_infix=no 3581 3582 case $cf_cv_system_name in #(vi 3583 aix4.[3-9]*|aix[[5-7]]*) #(vi 3584 if test "$GCC" = yes; then 3585 CC_SHARED_OPTS= 3586 MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@' 3587 else 3588 # CC_SHARED_OPTS='-qpic=large -G' 3589 # perhaps "-bM:SRE -bnoentry -bexpall" 3590 MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@' 3591 fi 3592 ;; 3593 beos*) #(vi 3594 MK_SHARED_LIB='${CC} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0' 3595 ;; 3596 cygwin*) #(vi 3597 CC_SHARED_OPTS= 3598 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}' 3599 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a" 3600 cf_cv_shlib_version=cygdll 3601 cf_cv_shlib_version_infix=cygdll 3602 cat >mk_shared_lib.sh <<-CF_EOF 3603 #!/bin/sh 3604 SHARED_LIB=\[$]1 3605 IMPORT_LIB=\`echo "\[$]1" | sed -e 's/cyg/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\` 3606 shift 3607 cat <<-EOF 3608 Linking shared library 3609 ** SHARED_LIB \[$]SHARED_LIB 3610 ** IMPORT_LIB \[$]IMPORT_LIB 3611EOF 3612 exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB} 3613CF_EOF 3614 chmod +x mk_shared_lib.sh 3615 ;; 3616 msys*) #(vi 3617 CC_SHARED_OPTS= 3618 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}' 3619 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a" 3620 cf_cv_shlib_version=msysdll 3621 cf_cv_shlib_version_infix=msysdll 3622 cat >mk_shared_lib.sh <<-CF_EOF 3623 #!/bin/sh 3624 SHARED_LIB=\[$]1 3625 IMPORT_LIB=\`echo "\[$]1" | sed -e 's/msys-/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\` 3626 shift 3627 cat <<-EOF 3628 Linking shared library 3629 ** SHARED_LIB \[$]SHARED_LIB 3630 ** IMPORT_LIB \[$]IMPORT_LIB 3631EOF 3632 exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB} 3633CF_EOF 3634 chmod +x mk_shared_lib.sh 3635 ;; 3636 darwin*) #(vi 3637 cf_try_cflags="no-cpp-precomp" 3638 CC_SHARED_OPTS="-dynamic" 3639 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]' 3640 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi 3641 cf_cv_shlib_version_infix=yes 3642 AC_CACHE_CHECK([if ld -search_paths_first works], cf_cv_ldflags_search_paths_first, [ 3643 cf_save_LDFLAGS=$LDFLAGS 3644 LDFLAGS="$LDFLAGS -Wl,-search_paths_first" 3645 AC_TRY_LINK(, [int i;], cf_cv_ldflags_search_paths_first=yes, cf_cv_ldflags_search_paths_first=no) 3646 LDFLAGS=$cf_save_LDFLAGS]) 3647 if test $cf_cv_ldflags_search_paths_first = yes; then 3648 LDFLAGS="$LDFLAGS -Wl,-search_paths_first" 3649 fi 3650 ;; 3651 hpux[[7-8]]*) #(vi 3652 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list 3653 if test "$GCC" != yes; then 3654 CC_SHARED_OPTS='+Z' 3655 fi 3656 MK_SHARED_LIB='${LD} -b -o $[@]' 3657 INSTALL_LIB="-m 555" 3658 ;; 3659 hpux*) #(vi 3660 # (tested with gcc 2.7.2 -- I don't have c89) 3661 if test "$GCC" = yes; then 3662 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}' 3663 else 3664 CC_SHARED_OPTS='+Z' 3665 LD_SHARED_OPTS='-Wl,+b,${libdir}' 3666 fi 3667 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $[@]' 3668 # HP-UX shared libraries must be executable, and should be 3669 # readonly to exploit a quirk in the memory manager. 3670 INSTALL_LIB="-m 555" 3671 ;; 3672 interix*) 3673 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel 3674 if test "$cf_cv_shlib_version" = rel; then 3675 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}' 3676 else 3677 cf_shared_soname='`basename $@`' 3678 fi 3679 CC_SHARED_OPTS= 3680 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@' 3681 ;; 3682 irix*) #(vi 3683 if test "$cf_cv_enable_rpath" = yes ; then 3684 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" 3685 fi 3686 # tested with IRIX 5.2 and 'cc'. 3687 if test "$GCC" != yes; then 3688 CC_SHARED_OPTS='-KPIC' 3689 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $[@]` -o $[@]' 3690 else 3691 MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $[@]` -o $[@]' 3692 fi 3693 cf_cv_rm_so_locs=yes 3694 ;; 3695 linux*|gnu*|k*bsd*-gnu) #(vi 3696 if test "$DFT_LWR_MODEL" = "shared" ; then 3697 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" 3698 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" 3699 fi 3700 if test "$cf_cv_enable_rpath" = yes ; then 3701 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" 3702 fi 3703 CF_SHARED_SONAME 3704 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' 3705 ;; 3706 mingw*) #(vi 3707 cf_cv_shlib_version=mingw 3708 cf_cv_shlib_version_infix=mingw 3709 if test "$DFT_LWR_MODEL" = "shared" ; then 3710 LOCAL_LDFLAGS="-Wl,--enable-auto-import" 3711 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" 3712 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS" 3713 fi 3714 CC_SHARED_OPTS= 3715 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}' 3716 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a" 3717 cat >mk_shared_lib.sh <<-CF_EOF 3718 #!/bin/sh 3719 SHARED_LIB=\[$]1 3720 IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.a/'\` 3721 shift 3722 cat <<-EOF 3723 Linking shared library 3724 ** SHARED_LIB \[$]SHARED_LIB 3725 ** IMPORT_LIB \[$]IMPORT_LIB 3726EOF 3727 exec \[$]* -shared -Wl,--enable-auto-import,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB} 3728CF_EOF 3729 chmod +x mk_shared_lib.sh 3730 ;; 3731 openbsd[[2-9]].*|mirbsd*) #(vi 3732 if test "$DFT_LWR_MODEL" = "shared" ; then 3733 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" 3734 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" 3735 fi 3736 if test "$cf_cv_enable_rpath" = yes ; then 3737 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" 3738 fi 3739 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" 3740 CF_SHARED_SONAME 3741 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' 3742 ;; 3743 nto-qnx*|openbsd*|freebsd[[12]].*) #(vi 3744 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" 3745 MK_SHARED_LIB='${LD} -Bshareable -o $[@]' 3746 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel 3747 ;; 3748 dragonfly*|freebsd*) #(vi 3749 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" 3750 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then 3751 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)" 3752 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS" 3753 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" 3754 fi 3755 CF_SHARED_SONAME 3756 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $[@]` -o $[@]' 3757 ;; 3758 netbsd*) #(vi 3759 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC" 3760 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then 3761 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)" 3762 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" 3763 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS" 3764 if test "$cf_cv_shlib_version" = auto; then 3765 if test -f /usr/libexec/ld.elf_so; then 3766 cf_cv_shlib_version=abi 3767 else 3768 cf_cv_shlib_version=rel 3769 fi 3770 fi 3771 CF_SHARED_SONAME 3772 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]' 3773 else 3774 MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $[@]' 3775 fi 3776 ;; 3777 osf*|mls+*) #(vi 3778 # tested with OSF/1 V3.2 and 'cc' 3779 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't 3780 # link with shared libs). 3781 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $[@]`' 3782 case $host_os in #(vi 3783 osf4*) 3784 MK_SHARED_LIB="${MK_SHARED_LIB} -msym" 3785 ;; 3786 esac 3787 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]' 3788 if test "$DFT_LWR_MODEL" = "shared" ; then 3789 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)" 3790 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" 3791 fi 3792 cf_cv_rm_so_locs=yes 3793 ;; 3794 sco3.2v5*) # (also uw2* and UW7: hops 13-Apr-98 3795 # tested with osr5.0.5 3796 if test "$GCC" != yes; then 3797 CC_SHARED_OPTS='-belf -KPIC' 3798 fi 3799 MK_SHARED_LIB='${LD} -dy -G -h `basename $[@] .${REL_VERSION}`.${ABI_VERSION} -o [$]@' 3800 if test "$cf_cv_enable_rpath" = yes ; then 3801 # only way is to set LD_RUN_PATH but no switch for it 3802 RUN_PATH=$libdir 3803 fi 3804 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel 3805 LINK_PROGS='LD_RUN_PATH=${libdir}' 3806 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib' 3807 ;; 3808 sunos4*) #(vi 3809 # tested with SunOS 4.1.1 and gcc 2.7.0 3810 if test "$GCC" != yes; then 3811 CC_SHARED_OPTS='-KPIC' 3812 fi 3813 MK_SHARED_LIB='${LD} -assert pure-text -o $[@]' 3814 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel 3815 ;; 3816 solaris2*) #(vi 3817 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 3818 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3 3819 if test "$DFT_LWR_MODEL" = "shared" ; then 3820 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}" 3821 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" 3822 fi 3823 if test "$cf_cv_enable_rpath" = yes ; then 3824 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS" 3825 fi 3826 CF_SHARED_SONAME 3827 if test "$GCC" != yes; then 3828 cf_save_CFLAGS="$CFLAGS" 3829 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O 3830 do 3831 CFLAGS="$cf_shared_opts $cf_save_CFLAGS" 3832 AC_TRY_COMPILE([#include <stdio.h>],[printf("Hello\n");],[break]) 3833 done 3834 CFLAGS="$cf_save_CFLAGS" 3835 CC_SHARED_OPTS=$cf_shared_opts 3836 MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $[@]' 3837 else 3838 MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]' 3839 fi 3840 ;; 3841 sysv5uw7*|unix_sv*) #(vi 3842 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc) 3843 if test "$GCC" != yes; then 3844 CC_SHARED_OPTS='-KPIC' 3845 fi 3846 MK_SHARED_LIB='${LD} -d y -G -o [$]@' 3847 ;; 3848 *) 3849 CC_SHARED_OPTS='unknown' 3850 MK_SHARED_LIB='echo unknown' 3851 ;; 3852 esac 3853 3854 # This works if the last tokens in $MK_SHARED_LIB are the -o target. 3855 case "$cf_cv_shlib_version" in #(vi 3856 rel|abi) 3857 case "$MK_SHARED_LIB" in #(vi 3858 *'-o $[@]') #(vi 3859 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes 3860 ;; 3861 *) 3862 AC_MSG_WARN(ignored --with-shlib-version) 3863 ;; 3864 esac 3865 ;; 3866 esac 3867 3868 if test -n "$cf_try_cflags" 3869 then 3870cat > conftest.$ac_ext <<EOF 3871#line __oline__ "${as_me:-configure}" 3872#include <stdio.h> 3873int main(int argc, char *argv[[]]) 3874{ 3875 printf("hello\n"); 3876 return (argv[[argc-1]] == 0) ; 3877} 3878EOF 3879 cf_save_CFLAGS="$CFLAGS" 3880 for cf_opt in $cf_try_cflags 3881 do 3882 CFLAGS="$cf_save_CFLAGS -$cf_opt" 3883 AC_MSG_CHECKING(if CFLAGS option -$cf_opt works) 3884 if AC_TRY_EVAL(ac_compile); then 3885 AC_MSG_RESULT(yes) 3886 cf_save_CFLAGS="$CFLAGS" 3887 else 3888 AC_MSG_RESULT(no) 3889 fi 3890 done 3891 CFLAGS="$cf_save_CFLAGS" 3892 fi 3893 3894 3895 # RPATH_LIST is a colon-separated list of directories 3896 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}" 3897 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}" 3898 3899 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations" 3900 3901 CF_VERBOSE(CC_SHARED_OPTS: $CC_SHARED_OPTS) 3902 CF_VERBOSE(MK_SHARED_LIB: $MK_SHARED_LIB) 3903 3904 AC_SUBST(CC_SHARED_OPTS) 3905 AC_SUBST(LD_RPATH_OPT) 3906 AC_SUBST(LD_SHARED_OPTS) 3907 AC_SUBST(MK_SHARED_LIB) 3908 AC_SUBST(RM_SHARED_OPTS) 3909 3910 AC_SUBST(LINK_PROGS) 3911 AC_SUBST(LINK_TESTS) 3912 3913 AC_SUBST(EXTRA_LDFLAGS) 3914 AC_SUBST(LOCAL_LDFLAGS) 3915 AC_SUBST(LOCAL_LDFLAGS2) 3916 3917 AC_SUBST(INSTALL_LIB) 3918 AC_SUBST(RPATH_LIST) 3919])dnl 3920dnl --------------------------------------------------------------------------- 3921dnl CF_SHARED_SONAME version: 3 updated: 2008/09/08 18:34:43 3922dnl ---------------- 3923dnl utility macro for CF_SHARED_OPTS, constructs "$cf_cv_shared_soname" for 3924dnl substitution into MK_SHARED_LIB string for the "-soname" (or similar) 3925dnl option. 3926dnl 3927dnl $1 is the default that should be used for "$cf_cv_shlib_version". 3928dnl If missing, use "rel". 3929define([CF_SHARED_SONAME], 3930[ 3931 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=ifelse($1,,rel,$1) 3932 if test "$cf_cv_shlib_version" = rel; then 3933 cf_cv_shared_soname='`basename $[@] .${REL_VERSION}`.${ABI_VERSION}' 3934 else 3935 cf_cv_shared_soname='`basename $[@]`' 3936 fi 3937]) 3938dnl --------------------------------------------------------------------------- |
|
3303dnl CF_SUBDIR_PATH version: 6 updated: 2010/04/21 06:20:50 3304dnl -------------- 3305dnl Construct a search-list for a nonstandard header/lib-file 3306dnl $1 = the variable to return as result 3307dnl $2 = the package name 3308dnl $3 = the subdirectory, e.g., bin, include or lib 3309AC_DEFUN([CF_SUBDIR_PATH], 3310[ --- 176 unchanged lines hidden (view full) --- 3487dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12 3488dnl ---------- 3489dnl Use AC_VERBOSE w/o the warnings 3490AC_DEFUN([CF_VERBOSE], 3491[test -n "$verbose" && echo " $1" 1>&AC_FD_MSG 3492CF_MSG_LOG([$1]) 3493])dnl 3494dnl --------------------------------------------------------------------------- | 3939dnl CF_SUBDIR_PATH version: 6 updated: 2010/04/21 06:20:50 3940dnl -------------- 3941dnl Construct a search-list for a nonstandard header/lib-file 3942dnl $1 = the variable to return as result 3943dnl $2 = the package name 3944dnl $3 = the subdirectory, e.g., bin, include or lib 3945AC_DEFUN([CF_SUBDIR_PATH], 3946[ --- 176 unchanged lines hidden (view full) --- 4123dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12 4124dnl ---------- 4125dnl Use AC_VERBOSE w/o the warnings 4126AC_DEFUN([CF_VERBOSE], 4127[test -n "$verbose" && echo " $1" 1>&AC_FD_MSG 4128CF_MSG_LOG([$1]) 4129])dnl 4130dnl --------------------------------------------------------------------------- |
3495dnl CF_VERSION_INFO version: 5 updated: 2012/10/06 08:57:51 | 4131dnl CF_VERSION_INFO version: 6 updated: 2013/06/16 10:25:53 |
3496dnl --------------- 3497dnl Define several useful symbols derived from the VERSION file. A separate 3498dnl file is preferred to embedding the version numbers in various scripts. 3499dnl (automake is a textbook-example of why the latter is a bad idea, but there 3500dnl are others). 3501dnl 3502dnl The file contents are: 3503dnl libtool-version release-version patch-version --- 48 unchanged lines hidden (view full) --- 3552 ;; 3553 esac 3554 AC_MSG_RESULT($VERSION_PATCH) 3555else 3556 AC_MSG_ERROR(did not find $srcdir/VERSION) 3557fi 3558 3559# show the actual data that we have for versions: | 4132dnl --------------- 4133dnl Define several useful symbols derived from the VERSION file. A separate 4134dnl file is preferred to embedding the version numbers in various scripts. 4135dnl (automake is a textbook-example of why the latter is a bad idea, but there 4136dnl are others). 4137dnl 4138dnl The file contents are: 4139dnl libtool-version release-version patch-version --- 48 unchanged lines hidden (view full) --- 4188 ;; 4189 esac 4190 AC_MSG_RESULT($VERSION_PATCH) 4191else 4192 AC_MSG_ERROR(did not find $srcdir/VERSION) 4193fi 4194 4195# show the actual data that we have for versions: |
3560CF_VERBOSE(VERSION $VERSION) | 4196CF_VERBOSE(ABI VERSION $VERSION) |
3561CF_VERBOSE(VERSION_MAJOR $VERSION_MAJOR) 3562CF_VERBOSE(VERSION_MINOR $VERSION_MINOR) 3563CF_VERBOSE(VERSION_PATCH $VERSION_PATCH) 3564 3565AC_SUBST(VERSION) 3566AC_SUBST(VERSION_MAJOR) 3567AC_SUBST(VERSION_MINOR) 3568AC_SUBST(VERSION_PATCH) --- 37 unchanged lines hidden (view full) --- 3606if test $ac_cv_header_waitstatus_h = yes; then 3607cf_wait_headers="$cf_wait_headers 3608#include <waitstatus.h> 3609" 3610fi 3611fi 3612])dnl 3613dnl --------------------------------------------------------------------------- | 4197CF_VERBOSE(VERSION_MAJOR $VERSION_MAJOR) 4198CF_VERBOSE(VERSION_MINOR $VERSION_MINOR) 4199CF_VERBOSE(VERSION_PATCH $VERSION_PATCH) 4200 4201AC_SUBST(VERSION) 4202AC_SUBST(VERSION_MAJOR) 4203AC_SUBST(VERSION_MINOR) 4204AC_SUBST(VERSION_PATCH) --- 37 unchanged lines hidden (view full) --- 4242if test $ac_cv_header_waitstatus_h = yes; then 4243cf_wait_headers="$cf_wait_headers 4244#include <waitstatus.h> 4245" 4246fi 4247fi 4248])dnl 4249dnl --------------------------------------------------------------------------- |
4250dnl CF_WITH_ABI_VERSION version: 1 updated: 2003/09/20 18:12:49 4251dnl ------------------- 4252dnl Allow library's ABI to be overridden. Generally this happens when a 4253dnl packager has incremented the ABI past that used in the original package, 4254dnl and wishes to keep doing this. 4255dnl 4256dnl $1 is the package name, if any, to derive a corresponding {package}_ABI 4257dnl symbol. 4258AC_DEFUN([CF_WITH_ABI_VERSION],[ 4259test -z "$cf_cv_abi_version" && cf_cv_abi_version=0 4260AC_ARG_WITH(abi-version, 4261[ --with-abi-version=XXX override derived ABI version], 4262[AC_MSG_WARN(overriding ABI version $cf_cv_abi_version to $withval) 4263 cf_cv_abi_version=$withval]) 4264 CF_NUMBER_SYNTAX($cf_cv_abi_version,ABI version) 4265ifelse($1,,,[ 4266$1_ABI=$cf_cv_abi_version 4267]) 4268])dnl 4269dnl --------------------------------------------------------------------------- |
|
3614dnl CF_WITH_CURSES_DIR version: 3 updated: 2010/11/20 17:02:38 3615dnl ------------------ 3616dnl Wrapper for AC_ARG_WITH to specify directory under which to look for curses 3617dnl libraries. 3618AC_DEFUN([CF_WITH_CURSES_DIR],[ 3619 3620AC_MSG_CHECKING(for specific curses-directory) 3621AC_ARG_WITH(curses-dir, --- 38 unchanged lines hidden (view full) --- 3660 [USE_DMALLOC]) 3661 3662if test "$with_dmalloc" = yes ; then 3663 AC_CHECK_HEADER(dmalloc.h, 3664 [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse([$1],,[],[,$1]))]) 3665fi 3666])dnl 3667dnl --------------------------------------------------------------------------- | 4270dnl CF_WITH_CURSES_DIR version: 3 updated: 2010/11/20 17:02:38 4271dnl ------------------ 4272dnl Wrapper for AC_ARG_WITH to specify directory under which to look for curses 4273dnl libraries. 4274AC_DEFUN([CF_WITH_CURSES_DIR],[ 4275 4276AC_MSG_CHECKING(for specific curses-directory) 4277AC_ARG_WITH(curses-dir, --- 38 unchanged lines hidden (view full) --- 4316 [USE_DMALLOC]) 4317 4318if test "$with_dmalloc" = yes ; then 4319 AC_CHECK_HEADER(dmalloc.h, 4320 [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse([$1],,[],[,$1]))]) 4321fi 4322])dnl 4323dnl --------------------------------------------------------------------------- |
3668dnl CF_WITH_LIBTOOL version: 28 updated: 2011/07/02 15:40:32 | 4324dnl CF_WITH_LIBTOOL version: 30 updated: 2013/09/07 13:54:05 |
3669dnl --------------- 3670dnl Provide a configure option to incorporate libtool. Define several useful 3671dnl symbols for the makefile rules. 3672dnl 3673dnl The reference to AC_PROG_LIBTOOL does not normally work, since it uses 3674dnl macros from libtool.m4 which is in the aclocal directory of automake. 3675dnl Following is a simple script which turns on the AC_PROG_LIBTOOL macro. 3676dnl But that still does not work properly since the macro is expanded outside --- 53 unchanged lines hidden (view full) --- 3730 # missing_content_AC_PROG_LIBTOOL{{ 3731 AC_PROG_LIBTOOL 3732 # missing_content_AC_PROG_LIBTOOL}} 3733],[ 3734 if test "$with_libtool" != "yes" ; then 3735 CF_PATH_SYNTAX(with_libtool) 3736 LIBTOOL=$with_libtool 3737 else | 4325dnl --------------- 4326dnl Provide a configure option to incorporate libtool. Define several useful 4327dnl symbols for the makefile rules. 4328dnl 4329dnl The reference to AC_PROG_LIBTOOL does not normally work, since it uses 4330dnl macros from libtool.m4 which is in the aclocal directory of automake. 4331dnl Following is a simple script which turns on the AC_PROG_LIBTOOL macro. 4332dnl But that still does not work properly since the macro is expanded outside --- 53 unchanged lines hidden (view full) --- 4386 # missing_content_AC_PROG_LIBTOOL{{ 4387 AC_PROG_LIBTOOL 4388 # missing_content_AC_PROG_LIBTOOL}} 4389],[ 4390 if test "$with_libtool" != "yes" ; then 4391 CF_PATH_SYNTAX(with_libtool) 4392 LIBTOOL=$with_libtool 4393 else |
3738 AC_PATH_PROG(LIBTOOL,libtool) | 4394 AC_CHECK_TOOLS(LIBTOOL,[libtool glibtool],none) 4395 CF_LIBTOOL_VERSION 4396 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool 4397 then 4398 CF_FORGET_TOOL(LIBTOOL) 4399 AC_CHECK_TOOLS(LIBTOOL,[glibtool],none) 4400 CF_LIBTOOL_VERSION 4401 fi |
3739 fi 3740 if test -z "$LIBTOOL" ; then 3741 AC_MSG_ERROR(Cannot find libtool) 3742 fi 3743])dnl 3744 LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o' 3745 LIB_OBJECT='${OBJECTS:.o=.lo}' 3746 LIB_SUFFIX=.la 3747 LIB_CLEAN='${LIBTOOL} --mode=clean' 3748 LIB_COMPILE='${LIBTOOL} --mode=compile' 3749 LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}' 3750 LIB_INSTALL='${LIBTOOL} --mode=install' 3751 LIB_UNINSTALL='${LIBTOOL} --mode=uninstall' 3752 LIB_PREP=: 3753 | 4402 fi 4403 if test -z "$LIBTOOL" ; then 4404 AC_MSG_ERROR(Cannot find libtool) 4405 fi 4406])dnl 4407 LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o' 4408 LIB_OBJECT='${OBJECTS:.o=.lo}' 4409 LIB_SUFFIX=.la 4410 LIB_CLEAN='${LIBTOOL} --mode=clean' 4411 LIB_COMPILE='${LIBTOOL} --mode=compile' 4412 LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}' 4413 LIB_INSTALL='${LIBTOOL} --mode=install' 4414 LIB_UNINSTALL='${LIBTOOL} --mode=uninstall' 4415 LIB_PREP=: 4416 |
3754 # Show the version of libtool 3755 AC_MSG_CHECKING(version of libtool) | 4417 CF_CHECK_LIBTOOL_VERSION |
3756 | 4418 |
3757 # Save the version in a cache variable - this is not entirely a good 3758 # thing, but the version string from libtool is very ugly, and for 3759 # bug reports it might be useful to have the original string. "(" 3760 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.]].*//'` 3761 AC_MSG_RESULT($cf_cv_libtool_version) 3762 if test -z "$cf_cv_libtool_version" ; then 3763 AC_MSG_ERROR(This is not GNU libtool) 3764 fi 3765 | |
3766 # special hack to add -no-undefined (which libtool should do for itself) 3767 LT_UNDEF= 3768 case "$cf_cv_system_name" in #(vi | 4419 # special hack to add -no-undefined (which libtool should do for itself) 4420 LT_UNDEF= 4421 case "$cf_cv_system_name" in #(vi |
3769 cygwin*|mingw32*|uwin*|aix[[4-7]]) #(vi | 4422 cygwin*|msys*|mingw32*|uwin*|aix[[4-7]]) #(vi |
3770 LT_UNDEF=-no-undefined 3771 ;; 3772 esac 3773 AC_SUBST([LT_UNDEF]) 3774 3775 # special hack to add --tag option for C++ compiler 3776 case $cf_cv_libtool_version in #(vi 3777 1.[[5-9]]*|[[2-9]].[[0-9.a-z]]*) #(vi --- 82 unchanged lines hidden (view full) --- 3860AC_DEFUN([CF_WITH_PURIFY],[ 3861CF_NO_LEAKS_OPTION(purify, 3862 [ --with-purify test: use Purify], 3863 [USE_PURIFY], 3864 [LINK_PREFIX="$LINK_PREFIX purify"]) 3865AC_SUBST(LINK_PREFIX) 3866])dnl 3867dnl --------------------------------------------------------------------------- | 4423 LT_UNDEF=-no-undefined 4424 ;; 4425 esac 4426 AC_SUBST([LT_UNDEF]) 4427 4428 # special hack to add --tag option for C++ compiler 4429 case $cf_cv_libtool_version in #(vi 4430 1.[[5-9]]*|[[2-9]].[[0-9.a-z]]*) #(vi --- 82 unchanged lines hidden (view full) --- 4513AC_DEFUN([CF_WITH_PURIFY],[ 4514CF_NO_LEAKS_OPTION(purify, 4515 [ --with-purify test: use Purify], 4516 [USE_PURIFY], 4517 [LINK_PREFIX="$LINK_PREFIX purify"]) 4518AC_SUBST(LINK_PREFIX) 4519])dnl 4520dnl --------------------------------------------------------------------------- |
4521dnl CF_WITH_REL_VERSION version: 1 updated: 2003/09/20 18:12:49 4522dnl ------------------- 4523dnl Allow library's release-version to be overridden. Generally this happens when a 4524dnl packager has incremented the release-version past that used in the original package, 4525dnl and wishes to keep doing this. 4526dnl 4527dnl $1 is the package name, if any, to derive corresponding {package}_MAJOR 4528dnl and {package}_MINOR symbols 4529dnl symbol. 4530AC_DEFUN([CF_WITH_REL_VERSION],[ 4531test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0 4532AC_ARG_WITH(rel-version, 4533[ --with-rel-version=XXX override derived release version], 4534[AC_MSG_WARN(overriding release version $cf_cv_rel_version to $withval) 4535 cf_cv_rel_version=$withval]) 4536ifelse($1,,[ 4537 CF_NUMBER_SYNTAX($cf_cv_rel_version,Release version) 4538],[ 4539 $1_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'` 4540 $1_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[[^.]]*//' -e 's/^\.//' -e 's/\..*//'` 4541 CF_NUMBER_SYNTAX([$]$1_MAJOR,Release major-version) 4542 CF_NUMBER_SYNTAX([$]$1_MINOR,Release minor-version) 4543]) 4544])dnl 4545dnl --------------------------------------------------------------------------- 4546dnl CF_WITH_SHARED_OR_LIBTOOL version: 5 updated: 2013/09/02 09:17:44 4547dnl ------------------------- 4548dnl Provide shared libraries using either autoconf macros (--with-shared) or 4549dnl using the external libtool script (--with-libtool). 4550dnl 4551dnl $1 = program name (all caps preferred) 4552dnl $1 = release version 4553dnl $2 = ABI version 4554define([CF_WITH_SHARED_OR_LIBTOOL],[ 4555 4556REL_VERSION=$2 4557ABI_VERSION=$3 4558cf_cv_rel_version=$REL_VERSION 4559AC_SUBST(ABI_VERSION) 4560AC_SUBST(REL_VERSION) 4561 4562CF_WITH_REL_VERSION($1) 4563CF_WITH_ABI_VERSION 4564 4565LIB_MODEL=static 4566DFT_LWR_MODEL=$LIB_MODEL 4567LIBTOOL_MAKE="#" 4568 4569# use to comment-out makefile lines 4570MAKE_NORMAL= 4571MAKE_STATIC= 4572MAKE_SHARED="#" 4573 4574CF_WITH_LIBTOOL 4575 4576LIB_CREATE="$LIB_CREATE \[$]@" 4577 4578if test "$with_libtool" = "yes" ; then 4579 OBJEXT="lo" 4580 LIB_MODEL=libtool 4581 DFT_LWR_MODEL=$LIB_MODEL 4582 LIBTOOL_MAKE= 4583 CF_WITH_LIBTOOL_OPTS 4584 MAKE_NORMAL="#" 4585 MAKE_STATIC="#" 4586 MAKE_SHARED= 4587else 4588 AC_MSG_CHECKING(if you want to build shared libraries) 4589 AC_ARG_WITH(shared, 4590 [ --with-shared generate shared-libraries], 4591 [with_shared=$withval], 4592 [with_shared=no]) 4593 AC_MSG_RESULT($with_shared) 4594 if test "$with_shared" = "yes" ; then 4595 LIB_MODEL=shared 4596 DFT_LWR_MODEL=$LIB_MODEL 4597 CF_SHARED_OPTS 4598 LIB_PREP=: 4599 LIB_CREATE="[$]MK_SHARED_LIB" 4600 CFLAGS="$CFLAGS $CC_SHARED_OPTS" 4601 MAKE_NORMAL="#" 4602 MAKE_STATIC="#" 4603 MAKE_SHARED= 4604 fi 4605fi 4606 4607LIB_SUFFIX= 4608CF_LIB_SUFFIX($LIB_MODEL, DFT_LIB_SUFFIX, DFT_DEP_SUFFIX) 4609LIB_SUFFIX=$DFT_LIB_SUFFIX 4610 4611AC_SUBST(DFT_LWR_MODEL) 4612AC_SUBST(DFT_LIB_SUFFIX) 4613AC_SUBST(DFT_DEP_SUFFIX) 4614AC_SUBST(LIB_MODEL) 4615 4616AC_SUBST(LIBTOOL_MAKE) 4617 4618AC_SUBST(MAKE_NORMAL) 4619AC_SUBST(MAKE_SHARED) 4620AC_SUBST(MAKE_STATIC) 4621])dnl 4622dnl --------------------------------------------------------------------------- |
|
3868dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21 3869dnl ---------------- 3870AC_DEFUN([CF_WITH_VALGRIND],[ 3871CF_NO_LEAKS_OPTION(valgrind, 3872 [ --with-valgrind test: use valgrind], 3873 [USE_VALGRIND]) 3874])dnl 3875dnl --------------------------------------------------------------------------- --- 54 unchanged lines hidden (view full) --- 3930 long x = winnstr(stdscr, "", 0); 3931 int x1, y1; 3932 getbegyx(stdscr, y1, x1)], 3933 [cf_cv_need_xopen_extension=yes], 3934 [cf_cv_need_xopen_extension=unknown])])]) 3935test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" 3936])dnl 3937dnl --------------------------------------------------------------------------- | 4623dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21 4624dnl ---------------- 4625AC_DEFUN([CF_WITH_VALGRIND],[ 4626CF_NO_LEAKS_OPTION(valgrind, 4627 [ --with-valgrind test: use valgrind], 4628 [USE_VALGRIND]) 4629])dnl 4630dnl --------------------------------------------------------------------------- --- 54 unchanged lines hidden (view full) --- 4685 long x = winnstr(stdscr, "", 0); 4686 int x1, y1; 4687 getbegyx(stdscr, y1, x1)], 4688 [cf_cv_need_xopen_extension=yes], 4689 [cf_cv_need_xopen_extension=unknown])])]) 4690test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" 4691])dnl 4692dnl --------------------------------------------------------------------------- |
3938dnl CF_XOPEN_SOURCE version: 42 updated: 2012/01/07 08:26:49 | 4693dnl CF_XOPEN_SOURCE version: 45 updated: 2013/09/07 14:06:25 |
3939dnl --------------- 3940dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, 3941dnl or adapt to the vendor's definitions to get equivalent functionality, 3942dnl without losing the common non-POSIX features. 3943dnl 3944dnl Parameters: 3945dnl $1 is the nominal value for _XOPEN_SOURCE 3946dnl $2 is the nominal value for _POSIX_C_SOURCE 3947AC_DEFUN([CF_XOPEN_SOURCE],[ | 4694dnl --------------- 4695dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, 4696dnl or adapt to the vendor's definitions to get equivalent functionality, 4697dnl without losing the common non-POSIX features. 4698dnl 4699dnl Parameters: 4700dnl $1 is the nominal value for _XOPEN_SOURCE 4701dnl $2 is the nominal value for _POSIX_C_SOURCE 4702AC_DEFUN([CF_XOPEN_SOURCE],[ |
4703AC_REQUIRE([AC_CANONICAL_HOST]) |
|
3948 3949cf_XOPEN_SOURCE=ifelse([$1],,500,[$1]) 3950cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2]) 3951cf_xopen_source= 3952 3953case $host_os in #(vi 3954aix[[4-7]]*) #(vi 3955 cf_xopen_source="-D_ALL_SOURCE" 3956 ;; | 4704 4705cf_XOPEN_SOURCE=ifelse([$1],,500,[$1]) 4706cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2]) 4707cf_xopen_source= 4708 4709case $host_os in #(vi 4710aix[[4-7]]*) #(vi 4711 cf_xopen_source="-D_ALL_SOURCE" 4712 ;; |
3957cygwin) #(vi | 4713cygwin|msys) #(vi |
3958 cf_XOPEN_SOURCE=600 3959 ;; 3960darwin[[0-8]].*) #(vi 3961 cf_xopen_source="-D_APPLE_C_SOURCE" 3962 ;; 3963darwin*) #(vi 3964 cf_xopen_source="-D_DARWIN_C_SOURCE" 3965 cf_XOPEN_SOURCE= --- 82 unchanged lines hidden (view full) --- 4048 AC_MSG_WARN(_XOPEN_SOURCE is lower than requested) 4049 fi 4050 else 4051 CF_TRY_XOPEN_SOURCE 4052 fi 4053fi 4054]) 4055dnl --------------------------------------------------------------------------- | 4714 cf_XOPEN_SOURCE=600 4715 ;; 4716darwin[[0-8]].*) #(vi 4717 cf_xopen_source="-D_APPLE_C_SOURCE" 4718 ;; 4719darwin*) #(vi 4720 cf_xopen_source="-D_DARWIN_C_SOURCE" 4721 cf_XOPEN_SOURCE= --- 82 unchanged lines hidden (view full) --- 4804 AC_MSG_WARN(_XOPEN_SOURCE is lower than requested) 4805 fi 4806 else 4807 CF_TRY_XOPEN_SOURCE 4808 fi 4809fi 4810]) 4811dnl --------------------------------------------------------------------------- |
4812dnl CF__ADD_SHLIB_RULES version: 4 updated: 2013/07/22 18:49:24 4813dnl ------------------- 4814dnl Append rules for creating, installing, uninstalling and cleaning library. 4815dnl In particular, this is needed for shared libraries since there are symbolic 4816dnl links which depend on configuration choices. 4817dnl 4818dnl The logic is controlled by these cache variables: 4819dnl $cf_cv_do_symlinks 4820dnl $cf_cv_shlib_version 4821dnl 4822dnl The macro uses variables set by CF__DEFINE_SHLIB_VARS 4823dnl 4824dnl $1 = makefile to append to 4825dnl $2 = model (static, shared, libtool) 4826dnl $3 = objects (dependencies) 4827dnl $4 = additional libraries needed to link the shared library 4828define([CF__ADD_SHLIB_RULES],[ 4829 4830CF__DEFINE_LIB_TARGET 4831 4832case x$2 in 4833xlibtool|xshared) #(vi 4834 cf_libdeps="ifelse($4,,,[$4])" 4835 ;; 4836x*) 4837 cf_libdeps= 4838 ;; 4839esac 4840 4841cat >>$1 <<CF_EOF 4842 4843# generated by CF__ADD_SHLIB_RULES 4844# libmodel: $2 4845# symlinks: $cf_cv_do_symlinks 4846# shlibver: $cf_cv_shlib_version 4847 4848CF_EOF 4849 4850cat >>$1 <<CF_EOF 4851$cf_libname :: \\ 4852CF_EOF 4853 4854cat >>$1 <<CF_EOF 4855 $3 4856 @echo linking \[$]@ 4857 \$(LIBTOOL_CREATE) $3 $cf_libdeps 4858CF_EOF 4859 4860if test "x$cf_cv_do_symlinks" = xyes 4861then 4862cat >>$1 <<CF_EOF 4863 \$(LN_S) $cf_libname $cf_liblink 4864 \$(LN_S) $cf_liblink $cf_libroot 4865CF_EOF 4866fi 4867 4868cat >>$1 <<CF_EOF 4869 4870install \\ 4871install.libs :: \$(DESTDIR)\$(libdir)/$cf_libname 4872 4873\$(DESTDIR)\$(libdir)/$cf_libname :: \\ 4874 \$(DESTDIR)\$(libdir) \\ 4875 $3 4876 @echo linking \[$]@ 4877 \$(LIBTOOL_CREATE) $3 $cf_libdeps 4878CF_EOF 4879 4880if test "x$cf_cv_do_symlinks" = xyes 4881then 4882cat >>$1 <<CF_EOF 4883 cd \$(DESTDIR)\$(libdir) && (\$(LN_S) $cf_libname $cf_liblink; \$(LN_S) $cf_liblink $cf_libroot; ) 4884CF_EOF 4885fi 4886 4887if test x$2 = xshared 4888then 4889cat >>$1 <<CF_EOF 4890 - test -z "\$(DESTDIR)" && /sbin/ldconfig 4891CF_EOF 4892fi 4893 4894cat >>$1 <<CF_EOF 4895 4896uninstall \\ 4897uninstall.libs :: 4898 @echo uninstalling \$(DESTDIR)\$(libdir)/$cf_libname 4899CF_EOF 4900 4901if test "x$cf_cv_do_symlinks" = xyes 4902then 4903cat >>$1 <<CF_EOF 4904 -rm -f \$(DESTDIR)\$(libdir)/$cf_libroot 4905 -rm -f \$(DESTDIR)\$(libdir)/$cf_liblink 4906CF_EOF 4907fi 4908 4909cat >>$1 <<CF_EOF 4910 -rm -f \$(DESTDIR)\$(libdir)/$cf_libname 4911 4912clean \\ 4913clean.libs :: 4914CF_EOF 4915 4916if test "x$cf_cv_do_symlinks" = xyes 4917then 4918cat >>$1 <<CF_EOF 4919 -rm -f $cf_libroot 4920 -rm -f $cf_liblink 4921CF_EOF 4922fi 4923 4924cat >>$1 <<CF_EOF 4925 -rm -f $cf_libname 4926 4927mostlyclean:: 4928 -rm -f $3 4929# end generated by CF__ADD_SHLIB_RULES 4930CF_EOF 4931])dnl 4932dnl --------------------------------------------------------------------------- |
|
4056dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49 4057dnl --------------- 4058dnl Define a reusable chunk which includes <curses.h> and <term.h> when they 4059dnl are both available. 4060define([CF__CURSES_HEAD],[ 4061#ifdef HAVE_XCURSES 4062#include <xcurses.h> 4063char * XCursesProgramName = "test"; --- 4 unchanged lines hidden (view full) --- 4068#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H) 4069#include <ncurses/term.h> 4070#elif defined(HAVE_TERM_H) 4071#include <term.h> 4072#endif 4073#endif 4074]) 4075dnl --------------------------------------------------------------------------- | 4933dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49 4934dnl --------------- 4935dnl Define a reusable chunk which includes <curses.h> and <term.h> when they 4936dnl are both available. 4937define([CF__CURSES_HEAD],[ 4938#ifdef HAVE_XCURSES 4939#include <xcurses.h> 4940char * XCursesProgramName = "test"; --- 4 unchanged lines hidden (view full) --- 4945#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H) 4946#include <ncurses/term.h> 4947#elif defined(HAVE_TERM_H) 4948#include <term.h> 4949#endif 4950#endif 4951]) 4952dnl --------------------------------------------------------------------------- |
4953dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49 4954dnl --------------- 4955dnl Define a reusable chunk which includes <curses.h> and <term.h> when they 4956dnl are both available. 4957define([CF__CURSES_HEAD],[ 4958#ifdef HAVE_XCURSES 4959#include <xcurses.h> 4960char * XCursesProgramName = "test"; 4961#else 4962#include <${cf_cv_ncurses_header:-curses.h}> 4963#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H) 4964#include <ncursesw/term.h> 4965#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H) 4966#include <ncurses/term.h> 4967#elif defined(HAVE_TERM_H) 4968#include <term.h> 4969#endif 4970#endif 4971]) 4972dnl --------------------------------------------------------------------------- 4973dnl CF__DEFINE_LIB_TARGET version: 1 updated: 2013/07/22 18:27:50 4974dnl --------------------- 4975define([CF__DEFINE_LIB_TARGET],[ 4976cf_libname=\${LIB_BASENAME} 4977cf_liblink=$cf_libname 4978cf_libroot=$cf_libname 4979 4980if test "x$cf_cv_do_symlinks" = xyes 4981then 4982 case "x$cf_cv_shlib_version" in #(vi 4983 xrel) #(vi 4984 cf_liblink="\${LIB_ABI_NAME}" 4985 cf_libname="\${LIB_REL_NAME}" 4986 ;; 4987 xabi) 4988 cf_liblink="\${LIB_REL_NAME}" 4989 cf_libname="\${LIB_ABI_NAME}" 4990 ;; 4991 esac 4992fi 4993LIB_TARGET=$cf_libname 4994])dnl 4995dnl --------------------------------------------------------------------------- 4996dnl CF__DEFINE_SHLIB_VARS version: 2 updated: 2013/07/27 17:38:32 4997dnl --------------------- 4998dnl Substitute makefile variables useful for CF__ADD_SHLIB_RULES. 4999dnl 5000dnl The substitution requires these variables: 5001dnl LIB_PREFI - "lib" 5002dnl LIB_ROOTNAME - "foo" 5003dnl LIB_SUFFIX - ".so" 5004dnl REL_VERSION - "5.0" 5005dnl ABI_VERSION - "4.2.4" 5006define([CF__DEFINE_SHLIB_VARS],[ 5007CF__DEFINE_LIB_TARGET 5008SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS\\ 5009LIB_BASENAME = ${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\ 5010LIB_REL_NAME = \${LIB_BASENAME}.\${REL_VERSION}\\ 5011LIB_ABI_NAME = \${LIB_BASENAME}.\${ABI_VERSION}\\ 5012LIB_TARGET = $LIB_TARGET\\ 5013RM_SHARED_OPTS = $RM_SHARED_OPTS\\ 5014# end CF__DEFINE_SHLIB_VARS" 5015AC_SUBST(SET_SHLIB_VARS) 5016AC_SUBST(LIB_TARGET) 5017])dnl 5018dnl --------------------------------------------------------------------------- |
|
4076dnl CF__ICONV_BODY version: 2 updated: 2007/07/26 17:35:47 4077dnl -------------- 4078dnl Test-code needed for iconv compile-checks 4079define([CF__ICONV_BODY],[ 4080 iconv_t cd = iconv_open("",""); 4081 iconv(cd,NULL,NULL,NULL,NULL); 4082 iconv_close(cd);] 4083)dnl 4084dnl --------------------------------------------------------------------------- 4085dnl CF__ICONV_HEAD version: 1 updated: 2007/07/26 15:57:03 4086dnl -------------- 4087dnl Header-files needed for iconv compile-checks 4088define([CF__ICONV_HEAD],[ 4089#include <stdlib.h> 4090#include <iconv.h>] 4091)dnl 4092dnl --------------------------------------------------------------------------- | 5019dnl CF__ICONV_BODY version: 2 updated: 2007/07/26 17:35:47 5020dnl -------------- 5021dnl Test-code needed for iconv compile-checks 5022define([CF__ICONV_BODY],[ 5023 iconv_t cd = iconv_open("",""); 5024 iconv(cd,NULL,NULL,NULL,NULL); 5025 iconv_close(cd);] 5026)dnl 5027dnl --------------------------------------------------------------------------- 5028dnl CF__ICONV_HEAD version: 1 updated: 2007/07/26 15:57:03 5029dnl -------------- 5030dnl Header-files needed for iconv compile-checks 5031define([CF__ICONV_HEAD],[ 5032#include <stdlib.h> 5033#include <iconv.h>] 5034)dnl 5035dnl --------------------------------------------------------------------------- |
5036dnl CF__INIT_SHLIB_RULES version: 2 updated: 2013/07/27 17:38:32 5037dnl -------------------- 5038dnl The third parameter to AC_OUTPUT, used to pass variables needed for 5039dnl CF__ADD_SHLIB_RULES. 5040define([CF__INIT_SHLIB_RULES],[ 5041ABI_VERSION="$ABI_VERSION" 5042REL_VERSION="$REL_VERSION" 5043LIB_MODEL="$LIB_MODEL" 5044LIB_PREFIX="$LIB_PREFIX" 5045LIB_ROOTNAME="$LIB_ROOTNAME" 5046DFT_DEP_SUFFIX="$DFT_DEP_SUFFIX" 5047RM_SHARED_OPTS="$RM_SHARED_OPTS" 5048cf_cv_do_symlinks="$cf_cv_do_symlinks" 5049cf_cv_shlib_version="$cf_cv_shlib_version" 5050]) 5051dnl --------------------------------------------------------------------------- |
|
4093dnl CF__INTL_BODY version: 1 updated: 2007/07/26 17:35:47 4094dnl ------------- 4095dnl Test-code needed for libintl compile-checks 4096dnl $1 = parameter 2 from AM_WITH_NLS 4097define([CF__INTL_BODY],[ 4098 bindtextdomain ("", ""); 4099 return (int) gettext ("") 4100 ifelse([$1], need-ngettext, [ + (int) ngettext ("", "", 0)], []) --- 42 unchanged lines hidden --- | 5052dnl CF__INTL_BODY version: 1 updated: 2007/07/26 17:35:47 5053dnl ------------- 5054dnl Test-code needed for libintl compile-checks 5055dnl $1 = parameter 2 from AM_WITH_NLS 5056define([CF__INTL_BODY],[ 5057 bindtextdomain ("", ""); 5058 return (int) gettext ("") 5059 ifelse([$1], need-ngettext, [ + (int) ngettext ("", "", 0)], []) --- 42 unchanged lines hidden --- |