Changeset 740 for vendor/current/lib/replace/libreplace.m4
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/replace/libreplace.m4
r414 r740 52 52 LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/snprintf.o" 53 53 54 AC_TYPE_SIGNAL55 54 AC_TYPE_UID_T 56 55 AC_TYPE_MODE_T … … 91 90 ) 92 91 92 AC_CHECK_HEADERS(linux/types.h) 93 93 94 AC_CACHE_CHECK([for working mmap],libreplace_cv_HAVE_MMAP,[ 94 95 AC_TRY_RUN([#include "$libreplacedir/test/shared_mmap.c"], … … 106 107 AC_CHECK_HEADERS(unix.h) 107 108 108 AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror )109 AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror strerror_r) 109 110 AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename) 110 111 AC_CHECK_FUNCS(waitpid wait4 strlcpy strlcat initgroups memmove strdup) 111 AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp dup2 )112 AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp dup2 dprintf vdprintf) 112 113 AC_CHECK_FUNCS(isatty chown lchown link readlink symlink realpath) 114 AC_CHECK_FUNCS(fdatasync,,[ 115 # if we didn't find it, look in librt (Solaris hides it there...) 116 AC_CHECK_LIB(rt, fdatasync, 117 [libreplace_cv_HAVE_FDATASYNC_IN_LIBRT=yes 118 AC_DEFINE(HAVE_FDATASYNC, 1, Define to 1 if there is support for fdatasync)]) 119 ]) 120 AC_HAVE_DECL(fdatasync, [#include <unistd.h>]) 121 AC_CHECK_FUNCS(clock_gettime,libreplace_cv_have_clock_gettime=yes,[ 122 AC_CHECK_LIB(rt, clock_gettime, 123 [libreplace_cv_HAVE_CLOCK_GETTIME_IN_LIBRT=yes 124 libreplace_cv_have_clock_gettime=yes 125 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, Define to 1 if there is support for clock_gettime)]) 126 ]) 127 AC_CHECK_FUNCS(get_current_dir_name) 113 128 AC_HAVE_DECL(setresuid, [#include <unistd.h>]) 114 129 AC_HAVE_DECL(setresgid, [#include <unistd.h>]) … … 229 244 AC_CHECK_FUNCS(strtoull __strtoull strtouq strtoll __strtoll strtoq) 230 245 246 AC_CHECK_FUNCS(memmem) 247 231 248 # this test disabled as we don't actually need __VA_ARGS__ yet 232 249 AC_TRY_CPP([ … … 281 298 m4_include(crypt.m4) 282 299 300 if test x$libreplace_cv_have_clock_gettime = xyes ; then 301 SMB_CHECK_CLOCK_ID(CLOCK_MONOTONIC) 302 SMB_CHECK_CLOCK_ID(CLOCK_PROCESS_CPUTIME_ID) 303 SMB_CHECK_CLOCK_ID(CLOCK_REALTIME) 304 fi 305 306 AC_CACHE_CHECK([for struct timespec type],libreplace_cv_struct_timespec, [ 307 AC_TRY_COMPILE([ 308 #include <sys/types.h> 309 #if STDC_HEADERS 310 #include <stdlib.h> 311 #include <stddef.h> 312 #endif 313 #if TIME_WITH_SYS_TIME 314 # include <sys/time.h> 315 # include <time.h> 316 #else 317 # if HAVE_SYS_TIME_H 318 # include <sys/time.h> 319 # else 320 # include <time.h> 321 # endif 322 #endif 323 ],[struct timespec ts;], 324 libreplace_cv_struct_timespec=yes,libreplace_cv_struct_timespec=no)]) 325 if test x"$libreplace_cv_struct_timespec" = x"yes"; then 326 AC_DEFINE(HAVE_STRUCT_TIMESPEC,1,[Whether we have struct timespec]) 327 fi 328 283 329 AC_CHECK_FUNCS([printf memset memcpy],,[AC_MSG_ERROR([Required function not found])]) 284 330 … … 309 355 m4_include(libreplace_macros.m4) 310 356 357 358 dnl SMB_CHECK_CLOCK_ID(clockid) 359 dnl Test whether the specified clock_gettime clock ID is available. If it 360 dnl is, we define HAVE_clockid 361 AC_DEFUN([SMB_CHECK_CLOCK_ID], 362 [ 363 AC_MSG_CHECKING(for $1) 364 AC_TRY_LINK([ 365 #if TIME_WITH_SYS_TIME 366 # include <sys/time.h> 367 # include <time.h> 368 #else 369 # if HAVE_SYS_TIME_H 370 # include <sys/time.h> 371 # else 372 # include <time.h> 373 # endif 374 #endif 375 ], 376 [ 377 clockid_t clk = $1; 378 ], 379 [ 380 AC_MSG_RESULT(yes) 381 AC_DEFINE(HAVE_$1, 1, 382 [Whether the clock_gettime clock ID $1 is available]) 383 ], 384 [ 385 AC_MSG_RESULT(no) 386 ]) 387 ]) 311 388 m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],[m4_include(autoconf-2.60.m4)])
Note:
See TracChangeset
for help on using the changeset viewer.