Changeset 221 for branches/samba-3.3.x/source/configure.in
- Timestamp:
- May 24, 2009, 7:17:10 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/configure.in
r206 r221 129 129 CFLAGS="${CFLAGS} -g" 130 130 else 131 CFLAGS=" -O"131 CFLAGS="${CFLAGS} -O" 132 132 fi 133 133 … … 1299 1299 ################################################# 1300 1300 # Check whether struct stat has timestamps with sub-second resolution. 1301 # At least IRIX and Solaris have these. 1301 # At least IRIX and Solaris have these. FREEBSD does as well, 1302 # but with different members 1302 1303 # 1303 1304 # We check that … … 1308 1309 # "struct timespec" or "timespec_t". Linux doesn't have timespec_t, so we 1309 1310 # prefer struct timespec. 1311 AC_CACHE_CHECK([whether struct stat has timespec timestamps], 1312 samba_cv_stat_timespec_hires, 1313 [ 1314 AC_TRY_COMPILE( 1315 [ 1316 #if TIME_WITH_SYS_TIME 1317 # include <sys/time.h> 1318 # include <time.h> 1319 #else 1320 # if HAVE_SYS_TIME_H 1321 # include <sys/time.h> 1322 # else 1323 # include <time.h> 1324 # endif 1325 #endif 1326 #ifdef HAVE_SYS_STAT_H 1327 #include <sys/stat.h> 1328 #endif 1329 ], 1330 [ 1331 struct timespec t; 1332 struct stat s = {0}; 1333 t = s.st_mtimespec; 1334 t = s.st_ctimespec; 1335 t = s.st_atimespec; 1336 ], 1337 samba_cv_stat_timespec_hires=yes, samba_cv_stat_timespec_hires=no) 1338 ]) 1339 1340 if test x"$samba_cv_stat_timespec_hires" = x"yes" ; then 1341 AC_DEFINE(HAVE_STAT_ST_MTIMESPEC, 1, [whether struct stat contains st_mtimepec]) 1342 AC_DEFINE(HAVE_STAT_ST_ATIMESPEC, 1, [whether struct stat contains st_atimespec]) 1343 AC_DEFINE(HAVE_STAT_ST_CTIMESPEC, 1, [whether struct stat contains st_ctimespec]) 1344 AC_DEFINE(HAVE_STAT_HIRES_TIMESTAMPS, 1, [whether struct stat has sub-second timestamps]) 1345 fi 1346 1347 1310 1348 1311 1349 AC_CACHE_CHECK([whether struct stat has sub-second timestamps], samba_cv_stat_hires, … … 1348 1386 fi 1349 1387 1350 AC_CACHE_CHECK([whether struct stat has sub-second timestamps without struct timespec ], samba_cv_stat_hires_notimespec,1388 AC_CACHE_CHECK([whether struct stat has sub-second timestamps without struct timespec suffixed nsec], samba_cv_stat_hires_notimespec, 1351 1389 [ 1352 1390 AC_TRY_COMPILE( … … 1376 1414 t.tv_nsec = s.st_atimensec; 1377 1415 ], 1378 samba_cv_stat_hires =yes, samba_cv_stat_hires=no)1416 samba_cv_stat_hires_notimespec=yes, samba_cv_stat_hires_notimespec=no) 1379 1417 ]) 1380 1418 … … 1384 1422 AC_DEFINE(HAVE_STAT_ST_CTIMENSEC, 1, [whether struct stat contains st_ctimensec]) 1385 1423 AC_DEFINE(HAVE_STAT_HIRES_TIMESTAMPS, 1, 1386 [whether struct stat has sub-second timestamps without struct timespec]) 1424 [whether struct stat has sub-second timestamps without struct timespec suffixed nsec]) 1425 fi 1426 1427 dnl AIX stype sub-second timestamps: 1428 AC_CACHE_CHECK([whether struct stat has sub-second timestamps without struct timespec suffixed _n], samba_cv_stat_hires_notimespec_n, 1429 [ 1430 AC_TRY_COMPILE( 1431 [ 1432 #if TIME_WITH_SYS_TIME 1433 # include <sys/time.h> 1434 # include <time.h> 1435 #else 1436 # if HAVE_SYS_TIME_H 1437 # include <sys/time.h> 1438 # else 1439 # include <time.h> 1440 # endif 1441 #endif 1442 #ifdef HAVE_SYS_STAT_H 1443 #include <sys/stat.h> 1444 #endif 1445 ], 1446 [ 1447 struct timespec t; 1448 struct stat s = {0}; 1449 t.tv_sec = s.st_mtime; 1450 t.tv_nsec = s.st_mtime_n; 1451 t.tv_sec = s.st_ctime; 1452 t.tv_nsec = s.st_ctime_n; 1453 t.tv_sec = s.st_atime; 1454 t.tv_nsec = s.st_atime_n; 1455 ], 1456 samba_cv_stat_hires_notimespec_n=yes, samba_cv_stat_hires_notimespec_n=no) 1457 ]) 1458 1459 if test x"$samba_cv_stat_hires_notimespec_n" = x"yes" ; then 1460 AC_DEFINE(HAVE_STAT_ST_MTIME_N, 1, [whether struct stat contains st_mtime_n]) 1461 AC_DEFINE(HAVE_STAT_ST_ATIME_N, 1, [whether struct stat contains st_atime_n]) 1462 AC_DEFINE(HAVE_STAT_ST_CTIME_N, 1, [whether struct stat contains st_ctime_n]) 1463 AC_DEFINE(HAVE_STAT_HIRES_TIMESTAMPS, 1, 1464 [whether struct stat has sub-second timestamps without struct timespec suffixed _n]) 1465 fi 1466 1467 dnl Tru64 has _micro_second_ resolution: 1468 AC_CACHE_CHECK([whether struct stat has sub-second timestamps in st_uXtime], samba_cv_stat_hires_uxtime, 1469 [ 1470 AC_TRY_COMPILE( 1471 [ 1472 #if TIME_WITH_SYS_TIME 1473 # include <sys/time.h> 1474 # include <time.h> 1475 #else 1476 # if HAVE_SYS_TIME_H 1477 # include <sys/time.h> 1478 # else 1479 # include <time.h> 1480 # endif 1481 #endif 1482 #ifdef HAVE_SYS_STAT_H 1483 #include <sys/stat.h> 1484 #endif 1485 ], 1486 [ 1487 struct timespec t; 1488 struct stat s = {0}; 1489 t.tv_sec = s.st_mtime; 1490 t.tv_nsec = s.st_umtime * 1000; 1491 t.tv_sec = s.st_ctime; 1492 t.tv_nsec = s.st_uctime * 1000; 1493 t.tv_sec = s.st_atime; 1494 t.tv_nsec = s.st_uatime * 1000; 1495 ], 1496 samba_cv_stat_hires_uxtime=yes, samba_cv_stat_hires_uxtime=no) 1497 ]) 1498 1499 if test x"$samba_cv_stat_hires_uxtime" = x"yes" ; then 1500 AC_DEFINE(HAVE_STAT_ST_UMTIME, 1, [whether struct stat contains st_umtime]) 1501 AC_DEFINE(HAVE_STAT_ST_UATIME, 1, [whether struct stat contains st_uatime]) 1502 AC_DEFINE(HAVE_STAT_ST_UCTIME, 1, [whether struct stat contains st_uctime]) 1503 AC_DEFINE(HAVE_STAT_HIRES_TIMESTAMPS, 1, 1504 [whether struct stat has sub-second timestamps in st_uXtime]) 1387 1505 fi 1388 1506 … … 1410 1528 t = s.st_birthtimespec; 1411 1529 ], 1412 samba_cv_stat_st_birthtimespec=yes, samba_cv_stat_ birthtimespec=no)1530 samba_cv_stat_st_birthtimespec=yes, samba_cv_stat_st_birthtimespec=no) 1413 1531 ]) 1414 1532 … … 1440 1558 t.tv_nsec = s.st_birthtimensec; 1441 1559 ], 1442 samba_cv_stat_st_birthtimensec=yes, samba_cv_stat_ birthtimensec=no)1560 samba_cv_stat_st_birthtimensec=yes, samba_cv_stat_st_birthtimensec=no) 1443 1561 ]) 1444 1562 … … 1470 1588 t = s.st_birthtime; 1471 1589 ], 1472 samba_cv_stat_st_birthtime=yes, samba_cv_stat_ birthtime=no)1590 samba_cv_stat_st_birthtime=yes, samba_cv_stat_st_birthtime=no) 1473 1591 ]) 1474 1592 … … 4930 5048 fi 4931 5049 5050 # Some systems use f_flag in struct statvfs while others use f_flags 5051 AC_CACHE_CHECK([that statvfs.statvfs_f_flag works],samba_cv_statvfs_f_flag, [ 5052 AC_TRY_COMPILE([#include <sys/types.h> 5053 #include <sys/statvfs.h>],[struct statvfs buf; buf.f_flag = 0], 5054 samba_cv_statvfs_f_flag=yes,samba_cv_statvfs_f_flag=no)]) 5055 if test x"$samba_cv_statvfs_f_flag" = x"yes"; then 5056 AC_DEFINE(HAVE_STATVFS_F_FLAG, 1, [Whether statvfs.f_flag exists]) 5057 fi 5058 5059 AC_CACHE_CHECK([that statvfs.statvfs_f_flags works],samba_cv_statvfs_f_flags, [ 5060 AC_TRY_COMPILE([#include <sys/types.h> 5061 #include <sys/statvfs.h>],[struct statvfs buf; buf.f_flags = 0], 5062 samba_cv_statvfs_f_flags=yes,samba_cv_statvfs_f_flags=no)]) 5063 if test x"$samba_cv_statvfs_f_flags" = x"yes"; then 5064 AC_DEFINE(HAVE_STATVFS_F_FLAGS, 1, [Whether statvfs.f_flags exists]) 5065 fi 5066 5067 4932 5068 if test $space = no; then 4933 5069 # DEC Alpha running OSF/1 … … 5091 5227 # check for cluster extensions 5092 5228 5093 AC_MSG_CHECKING(whether to include cluster support) 5229 CTDB_CFLAGS="" 5230 AC_SUBST(CTDB_CFLAGS) 5231 AC_ARG_WITH(ctdb, 5232 [AS_HELP_STRING([--with-ctdb=DIR], [Where to find ctdb sources])], 5233 [ case "$withval" in 5234 yes|no) 5235 AC_MSG_WARN([--with-ctdb called without argument]) 5236 ;; 5237 *) 5238 CTDB_CPPFLAGS="-I$withval/include" 5239 ;; 5240 esac]) 5241 5242 SAVED_CPPFLAGS="$CPPFLAGS" 5243 CPPFLAGS="$CPPFLAGS $CTDB_CPPFLAGS" 5244 ctdb_broken="missing or broken headers" 5245 5246 AC_CHECK_HEADERS(ctdb.h ctdb_private.h,,,[ 5247 #include "confdefs.h" 5248 #define NO_CONFIG_H 5249 #include "replace.h" 5250 #include "system/wait.h" 5251 #include "system/network.h" 5252 #define private #error __USED_RESERVED_WORD_private__ 5253 #include <talloc.h> 5254 #include <tdb.h> 5255 #include <ctdb.h> 5256 ]) 5257 5258 AC_HAVE_DECL(CTDB_CONTROL_TRANS2_COMMIT_RETRY,[ 5259 #include "confdefs.h" 5260 #define NO_CONFIG_H 5261 #include "replace.h" 5262 #include "system/wait.h" 5263 #include "system/network.h" 5264 #include <talloc.h> 5265 #include <tdb.h> 5266 #include <ctdb.h> 5267 #include <ctdb_private.h> 5268 ]) 5269 if test x"$ac_cv_have_CTDB_CONTROL_TRANS2_COMMIT_RETRY_decl" = x"yes"; then 5270 ctdb_broken=no 5271 else 5272 ctdb_broken="missing transaction support" 5273 fi 5274 5275 # in ctdb 1.0.57 ctdb_control_tcp was temparary renamed to ctdb_tcp_client 5276 AC_CHECK_TYPE(struct ctdb_tcp_client,[ 5277 AC_DEFINE([ctdb_control_tcp],[ctdb_tcp_client],[ctdb ipv4 support]) 5278 ],,[ 5279 #include "confdefs.h" 5280 #define NO_CONFIG_H 5281 #include "replace.h" 5282 #include "system/wait.h" 5283 #include "system/network.h" 5284 #include <talloc.h> 5285 #include <tdb.h> 5286 #include <ctdb.h> 5287 #include <ctdb_private.h> 5288 ]) 5289 5290 AC_CHECK_TYPE(struct ctdb_control_tcp,[ 5291 AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP],[1],[ctdb ipv4 support]) 5292 ],[ 5293 ctdb_broken="missing struct ctdb_control_tcp" 5294 ],[ 5295 #include "confdefs.h" 5296 #define NO_CONFIG_H 5297 #include "replace.h" 5298 #include "system/wait.h" 5299 #include "system/network.h" 5300 #include <talloc.h> 5301 #include <tdb.h> 5302 #include <ctdb.h> 5303 #include <ctdb_private.h> 5304 ]) 5305 5306 AC_CHECK_TYPE(struct ctdb_control_tcp_addr,[ 5307 AC_DEFINE([HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR],[1],[ctdb ipv6 support]) 5308 ],,[ 5309 #include "confdefs.h" 5310 #define NO_CONFIG_H 5311 #include "replace.h" 5312 #include "system/wait.h" 5313 #include "system/network.h" 5314 #include <talloc.h> 5315 #include <tdb.h> 5316 #include <ctdb.h> 5317 #include <ctdb_private.h> 5318 ]) 5319 CPPFLAGS="$SAVED_CPPFLAGS" 5320 5321 AC_MSG_CHECKING(cluster support) 5094 5322 AC_ARG_WITH(cluster-support, 5095 [AS_HELP_STRING([--with-cluster-support], [Enable cluster extensions (default=no)])]) 5096 if test "x$with_cluster_support" = "xyes"; then 5323 [AS_HELP_STRING([--with-cluster-support], [Enable cluster extensions (default=auto)])]) 5324 5325 if test x"$with_cluster_support" = x ; then 5326 with_cluster_support="auto" 5327 fi 5328 5329 if test x"$ac_cv_header_ctdb_private_h" != x"yes"; then 5330 if test "x$with_cluster_support" = "xyes"; then 5331 AC_MSG_ERROR("ctdb_private.h is required for cluster support") 5332 fi 5333 with_cluster_support=no 5334 fi 5335 5336 if test x"$ctdb_broken" != x"no"; then 5337 if test "x$with_cluster_support" = "xyes"; then 5338 AC_MSG_ERROR(["cluster support: $ctdb_broken"]) 5339 fi 5340 with_cluster_support=no 5341 fi 5342 5343 if test "x$with_cluster_support" != "xno"; then 5097 5344 AC_DEFINE(CLUSTER_SUPPORT,1,[Whether to enable cluster extensions]) 5345 SAMBA_CPPFLAGS="${SAMBA_CPPFLAGS} ${CTDB_CPPFLAGS}" 5098 5346 AC_MSG_RESULT(yes) 5099 5347 else 5100 5348 AC_MSG_RESULT(no) 5101 5349 fi 5102 5103 5350 5104 5351 ################################################# … … 5938 6185 AC_CHECK_LIB_EXT(dns_sd, DNSSD_LIBS, DNSServiceRegister) 5939 6186 if test x"$ac_cv_func_DNSServiceRegister" != x"yes" -a \ 5940 x"$ac_cv_lib_ext_ DNSServiceRegister" != x"yes"; then6187 x"$ac_cv_lib_ext_dns_sd_DNSServiceRegister" != x"yes"; then 5941 6188 have_dnssd_support=no 5942 6189 fi
Note:
See TracChangeset
for help on using the changeset viewer.