1dnl Process this file with autoconf to produce a configure script. 2AC_INIT([fakeroot],[1.23],[clint@debian.org],[fakeroot]) 3AC_PREREQ([2.69]) 4AC_CONFIG_MACRO_DIR([build-aux]) 5LT_PREREQ(2.1a) 6AC_CANONICAL_TARGET 7AM_INIT_AUTOMAKE 8AM_MAINTAINER_MODE 9AC_CONFIG_HEADERS([config.h]) 10AC_PROG_MAKE_SET 11LT_INIT 12LT_LANG(C) 13 14AH_BOTTOM([#if ! HAVE_BUILTIN_EXPECT 15#define __builtin_expect(x, expected_value) (x) 16#endif]) 17 18AC_ARG_WITH([ipc], 19 AS_HELP_STRING([--with-ipc@<:@=IPCTYPE@:>@], 20 [method of IPC to use: either sysv (default) or tcp]), 21 [ac_cv_use_ipc=$withval], 22 [ac_cv_use_ipc=sysv]) 23 24AC_CACHE_CHECK([which IPC method to use], 25 [ac_cv_use_ipc], 26 [ac_cv_use_ipc=sysv]) 27 28AC_ARG_WITH([dbformat], 29 AS_HELP_STRING([--with-dbformat@<:@=DBFORMAT@:>@], 30 [database format to use: either inode (default) or path]), 31 [ac_cv_dbformat=$withval], 32 [ac_cv_dbformat=inode]) 33 34AC_CACHE_CHECK([which database format to use], 35 [ac_cv_dbformat], 36 [ac_cv_dbformat=inode]) 37 38AH_TEMPLATE([FAKEROOT_DB_PATH], [store path in the database instead of inode and device]) 39if test $ac_cv_dbformat = "path"; then 40AC_DEFINE_UNQUOTED(FAKEROOT_DB_PATH, [1]) 41fi 42 43dnl Checks for programs. 44 45dnl Checks for libraries. 46dnl Replace `main' with a function in -ldl: 47AC_CHECK_LIB(dl, dlopen) 48AH_TEMPLATE([FAKEROOT_FAKENET], [use TCP instead of SysV IPC]) 49if test $ac_cv_use_ipc = "tcp"; then 50AC_DEFINE_UNQUOTED(FAKEROOT_FAKENET, [TCP]) 51AC_CHECK_LIB(pthread, pthread_self) 52AC_CHECK_LIB(socket, connect) 53signal=HUP 54else 55signal=TERM 56fi 57 58AC_SUBST(signal) 59 60dnl Checks for header files. 61AC_HEADER_DIRENT 62AC_HEADER_STDC 63AC_CHECK_HEADERS(fcntl.h unistd.h features.h sys/feature_tests.h pthread.h stdint.h inttypes.h grp.h endian.h sys/sysmacros.h sys/socket.h sys/acl.h sys/capability.h sys/xattr.h fts.h) 64 65dnl Checks for typedefs, structures, and compiler characteristics. 66AC_C_CONST 67AC_CHECK_TYPE(mode_t, int) 68AC_CHECK_TYPE(off_t, long) 69AC_CHECK_TYPE(size_t, unsigned) 70 71AH_TEMPLATE([FAKEROOT_ATTR], [for packed]) 72if test -n "$GCC"; 73then 74AC_DEFINE_UNQUOTED(FAKEROOT_ATTR(x), [__attribute__ ((x))]) 75else 76AC_DEFINE_UNQUOTED(FAKEROOT_ATTR(x), []) 77fi 78 79dnl The parameters to the wrapped functions have to match 80dnl those in the system header files. I don't know how to 81dnl really get the names of the paramters, but this seems to work. 82AC_MSG_CHECKING([for return value and second and third argument of readlink]) 83readlink_buf_arg=unknown 84readlink_bufsize_arg=unknown 85for zeroth in ssize_t int; do 86 for second in void char; do 87 for third in size_t int; do 88 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h> 89 $zeroth readlink(const char *path, $second *buf, $third bufsiz);]], [[puts("hello, world");]])], 90 [readlink_retval=$zeroth 91 readlink_buf_arg=$second 92 readlink_bufsize_arg=$third 93 ],[]) 94 done 95 done 96done 97AC_MSG_RESULT([$readlink_retval, $readlink_buf_arg, $readlink_bufsize_arg]) 98AH_TEMPLATE([READLINK_RETVAL_TYPE], [type of readlink return value]) 99AH_TEMPLATE([READLINK_BUF_TYPE], [type of readlink buf]) 100AH_TEMPLATE([READLINK_BUFSIZE_TYPE], [type of readlink bufsize]) 101AC_DEFINE_UNQUOTED(READLINK_RETVAL_TYPE, $readlink_retval) 102AC_DEFINE_UNQUOTED(READLINK_BUF_TYPE, $readlink_buf_arg) 103AC_DEFINE_UNQUOTED(READLINK_BUFSIZE_TYPE, $readlink_bufsize_arg) 104 105AC_MSG_CHECKING([for first argument of setgroups]) 106setgroups_size_arg=unknown 107for first in size_t int; do 108 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _BSD_SOURCE 109#ifdef HAVE_SYS_TYPES_H 110#include <sys/types.h> 111#endif 112#include <unistd.h> 113#ifdef HAVE_GRP_H 114#include <grp.h> 115#endif 116 int setgroups($first size, const gid_t *list);]], [[puts("hello, world");]])],[setgroups_size_arg=$first],[]) 117done 118AC_MSG_RESULT([$setgroups_size_arg]) 119AH_TEMPLATE([SETGROUPS_SIZE_TYPE], [type of setgroups size]) 120AC_DEFINE_UNQUOTED(SETGROUPS_SIZE_TYPE, $setgroups_size_arg) 121 122 123AH_TEMPLATE([HAVE_SEMUN_DEF], [have the semun union]) 124AC_MSG_CHECKING([for union semun]) 125 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 126 # include <sys/types.h> 127 # include <sys/ipc.h> 128 # include <sys/sem.h> 129 ]], [[ 130 union semun s; 131 ]])],[AC_DEFINE(HAVE_SEMUN_DEF) 132 AC_MSG_RESULT([yes]) 133 ],[ AC_MSG_RESULT([no]) 134 ]) 135 136AH_TEMPLATE([XMKNOD_FRTH_ARG], [fourth argument of __xmknod]) 137dnl glibc uses `* dev' as fourth argument of __xmknod. 138dnl Although the test below should probably be more general 139dnl (not just __xmknod, but also mknod etc), at the moment this 140dnl seems enough, as probably glibc is the only that does this. 141AC_MSG_CHECKING([for type of arg of __xmknod]) 142 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 143 #include <sys/types.h> 144 #include <sys/stat.h> 145 #include <fcntl.h> 146 #include <unistd.h> 147 ]], [[ 148 int __xmknod ( int ver, 149 const char *pathname , 150 mode_t mode , dev_t dev); 151 ]])],[ 152 AC_DEFINE(XMKNOD_FRTH_ARG,) 153 AC_MSG_RESULT([no extra *]) 154 ],[ 155 AC_DEFINE(XMKNOD_FRTH_ARG,[*]) 156 AC_MSG_RESULT([needs *]) 157 158 ]) 159 160dnl Possibly this should only be done if we actually have mknodat 161dnl on the system. Nothing breaks by running the test itself though. 162AH_TEMPLATE([XMKNODAT_FIFTH_ARG], [fifth argument of __xmknodat]) 163dnl glibc uses `* dev' as fifth argument of __xmknodat. 164dnl Although the test below should probably be more general 165dnl (not just __xmknodat, but also mknod etc), at the moment this 166dnl seems enough, as probably glibc is the only that does this. 167AC_MSG_CHECKING([for type of arg of __xmknodat]) 168 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 169 #include <sys/types.h> 170 #include <sys/stat.h> 171 #include <fcntl.h> 172 #include <unistd.h> 173 ]], [[ 174 int __xmknodat ( int ver, 175 int dirfd, 176 const char *pathname , 177 mode_t mode , dev_t dev); 178 ]])],[ 179 AC_DEFINE(XMKNODAT_FIFTH_ARG,) 180 AC_MSG_RESULT([no extra *]) 181 ],[ 182 AC_DEFINE(XMKNODAT_FIFTH_ARG,[*]) 183 AC_MSG_RESULT([needs *]) 184 185 ]) 186 187AH_TEMPLATE([INITGROUPS_SECOND_ARG], [second argument of initgroups]) 188dnl FreeBSD 4.7 uses int instead of gid_t 189AC_MSG_CHECKING([for type of arg of initgroups]) 190 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 191 #include <sys/types.h> 192 #include <unistd.h> 193 ]], [[ 194 int initgroups ( const char *user, gid_t group ); 195 ]])],[ 196 AC_DEFINE(INITGROUPS_SECOND_ARG, gid_t) 197 AC_MSG_RESULT([gid_t]) 198 ],[ 199 AC_DEFINE(INITGROUPS_SECOND_ARG, int) 200 AC_MSG_RESULT([not gid_t; will assume int]) 201 ]) 202 203AH_TEMPLATE([SETREUID_ARG], [argument of setreuid]) 204dnl OpenBSD 2.8 uses int instead of uid_t 205AC_MSG_CHECKING([for type of arg of setreuid]) 206 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 207 #include <sys/types.h> 208 #include <unistd.h> 209 ]], [[ 210 int setreuid ( uid_t ruid, uid_t euid ); 211 ]])],[ 212 AC_DEFINE(SETREUID_ARG, gid_t) 213 AC_MSG_RESULT([gid_t]) 214 ],[ 215 AC_DEFINE(SETREUID_ARG, int) 216 AC_MSG_RESULT([not uid_t; will assume int]) 217 ]) 218 219AH_TEMPLATE([SETREGID_ARG], [argument of setregid]) 220dnl OpenBSD 2.8 uses int instead of gid_t 221AC_MSG_CHECKING([for type of arg of setregid]) 222 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 223 #include <sys/types.h> 224 #include <unistd.h> 225 ]], [[ 226 int setreuid ( gid_t rgid, gid_t egid ); 227 ]])],[ 228 AC_DEFINE(SETREGID_ARG, gid_t) 229 AC_MSG_RESULT([gid_t]) 230 ],[ 231 AC_DEFINE(SETREGID_ARG, int) 232 AC_MSG_RESULT([not gid_t; will assume int]) 233 ]) 234 235AH_TEMPLATE([STAT_SECOND_ARG], [second argument of stat]) 236dnl Tru64 or something uses stat * instead of struct stat * 237AC_MSG_CHECKING([for type of second arg to stat]) 238 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 239 #include <sys/stat.h> 240 #include <sys/types.h> 241 #include <unistd.h> 242 ]], [[ 243 int stat ( const char *file_name, struct stat *buf); 244 ]])],[ 245 AC_DEFINE(STAT_SECOND_ARG, struct stat *) 246 AC_MSG_RESULT([struct stat *]) 247 ],[ 248 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 249 #include <sys/stat.h> 250 #include <sys/types.h> 251 #include <unistd.h> 252 ]], [[ 253 int stat ( const char *file_name, stat *buf); 254 ]])],[ 255 AC_DEFINE(STAT_SECOND_ARG, stat *) 256 AC_MSG_RESULT([stat *]) 257 ],[ 258 AC_MSG_ERROR(cannot determine second stat argument) 259 ]) 260]) 261 262for field in d_off d_type; do 263AC_MSG_CHECKING([for ${field} in struct dirent]) 264AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 265 #include <sys/types.h> 266 #include <dirent.h> 267 ]], [[ 268 269 struct dirent d; 270 d.${field}=0 271 ]])],[AC_DEFINE_UNQUOTED(STAT_HAS_${field},1) 272 AC_MSG_RESULT([yes]) 273 ],[ AC_MSG_RESULT([no]) 274 ]) 275done 276 277AH_TEMPLATE([HAVE_ACL_T], [acl_t data type and associated functions are provided by OS]) 278AC_MSG_CHECKING([for acl_t struct]) 279AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 280 #include <sys/types.h> 281 #include <sys/acl.h> 282 ]], [[ 283 acl_t t; 284 ]])],[AC_DEFINE_UNQUOTED(HAVE_ACL_T,1) 285 AC_MSG_RESULT([yes]) 286 ],[ AC_MSG_RESULT([no]) 287 ]) 288 289AC_CHECK_FUNCS(fchmodat fchownat fstatat mkdirat mknodat openat renameat unlinkat lchmod fgetattrlist) 290 291AC_CHECK_FUNCS(capset listxattr llistxattr flistxattr getxattr lgetxattr fgetxattr setxattr lsetxattr fsetxattr removexattr lremovexattr fremovexattr) 292 293dnl find out how stat() etc are called. On linux systems, we really 294dnl need to wrap (IIRC): 295dnl Linux : __xstat 296dnl Solaris <=9 : _stat 297dnl Solaris 10 : _xstat 298dnl Digital Unix: stat 299 300:>fakerootconfig.h.tmp 301 302for SEARCH in %stat f%stat l%stat f%statat %stat64 f%stat64 l%stat64 f%statat64 %mknod %mknodat; do 303 FUNC=`echo $SEARCH|sed -e 's/.*%//'` 304 PRE=`echo $SEARCH|sed -e 's/%.*//'` 305 FOUND= 306 for WRAPPED in __${PRE}x${FUNC} _${PRE}x${FUNC} __${PRE}${FUNC}13 ${PRE}${FUNC}; do 307 AC_CHECK_FUNCS($WRAPPED,FOUND=$WRAPPED) 308dnl 309dnl to unconditionally define only the _* functions, comment out the 2 lines above, 310dnl and uncomment the 2 lines below. 311dnl 312dnl for WRAPPED in _${PRE}${FUNC}; do 313dnl FOUND=$WRAPPED 314 if test -n "$FOUND"; then 315 PF=[`echo ${PRE}${FUNC}| tr '[a-z]' '[A-Z]'`] 316 DEFINE_WRAP=[`echo wrap_${PRE}${FUNC}| tr '[a-z]' '[A-Z]'`] 317 DEFINE_NEXT=[`echo wrap_${FOUND}| tr '[a-z]' '[A-Z]'`] 318 DEFINE_ARG=[`echo wrap_${FOUND}| tr '[a-z]' '[A-Z]'`] 319 AC_DEFINE_UNQUOTED(WRAP_${PF}, $FOUND) 320 AC_DEFINE_UNQUOTED(WRAP_${PF}_RAW, $FOUND) 321 AC_DEFINE_UNQUOTED(WRAP_${PF}_QUOTE, "$FOUND") 322 AC_DEFINE_UNQUOTED(TMP_${PF}, tmp_$FOUND) 323 AC_DEFINE_UNQUOTED(NEXT_${PF}_NOARG, next_$FOUND) 324 if test __"${PRE}x${FUNC}" != "${WRAPPED}" && test _"${PRE}x${FUNC}" != "${WRAPPED}" ; then 325 DEF_BEGIN="" 326 else 327 DEF_BEGIN="a," 328 fi 329 if test "${FUNC}" = "mknod"; then 330 DEF_END=",d" 331 elif test "${FUNC}" = "mknodat"; then 332 DEF_END=",d,e" 333 elif test "${FUNC}" = "statat"; then 334 DEF_END=",d,e" 335 elif test "${FUNC}" = "statat64"; then 336 DEF_END=",d,e" 337 else 338 DEF_END="" 339 fi 340 dnl no matter what I do, the resulting define looks like 341 dnl #define macro (a,b,c) (a,b,c) 342 dnl with a space in between "macro" and "(". To prevent this, 343 dnl I leave the space here, and remove it later with sed 344 dnl at (end of configure.in) 345 dnl AC_DEFINE_UNQUOTED(NEXT_${PF}(a,b,c${DEF_END}), 346 dnl next_$FOUND(${DEF_BEGIN}b,c${DEF_END})) 347 dnl AC_DEFINE_UNQUOTED(${PF}[_ARG(a,b,c${DEF_END})], 348 dnl (${DEF_BEGIN}b,c${DEF_END})) 349 350 dnl Anyway the trickery above also leads to automake problems 351 dnl (tries to remake config.h.in, but fails). So, as a way 352 dnl out, Yann DIRSON wrote this: 353 { 354 echo "#define NEXT_${PF}(a,b,c${DEF_END}) next_$FOUND(${DEF_BEGIN}b,c${DEF_END})" 355 echo "#define ${PF}_ARG(a,b,c${DEF_END}) (${DEF_BEGIN}b,c${DEF_END})" 356 } >>fakerootconfig.h.tmp 357 358 break 359 fi 360 done 361done 362 363if test -r fakerootconfig.h 364then 365 if test "`diff fakerootconfig.h fakerootconfig.h.tmp`" = "" 366 then 367 AC_MSG_RESULT([fakerootconfig.h not changed]) 368 rm fakerootconfig.h.tmp 369 else 370 AC_MSG_RESULT([recreated fakerootconfig.h]) 371 rm fakerootconfig.h ; mv fakerootconfig.h.tmp fakerootconfig.h 372 fi 373else 374 AC_MSG_RESULT([created fakerootconfig.h]) 375 mv fakerootconfig.h.tmp fakerootconfig.h 376fi 377 378dnl This should really be done intelligently. 379DLSUFFIX=".so" 380LDLIBPATHVAR="LD_LIBRARY_PATH" 381LDPRELOADVAR="LD_PRELOAD" 382LDPRELOADABS=0 383LDEXTRAVAR="" 384case $target_cpu:$target_os in 385 (alpha*:linux*|ia64*:linux*) 386 libcpath="/lib/libc.so.6.1" 387 ;; 388 (*:linux*) 389 libcpath="/lib/libc.so.6" 390 ;; 391 (*:k*bsd*-gnu) 392 libcpath="/lib/libc.so.0.1" 393 ;; 394 (*:freebsd*) 395 libcpath="/usr/lib/libc.so.4" 396 ;; 397 (*:netbsd*) 398 libcpath="/usr/lib/libc.so.12" 399 ;; 400 (*:openbsd*|*:mirbsd*) 401 libcpath=$(/bin/ls -1 /usr/lib/libc.so.* | \ 402 sort -nt. -k3 | tail -1) 403 ;; 404 (*:midnightbsd*) 405 libcpath=$(/bin/ls -1 /lib/libc.so.* | \ 406 sort -nt. -k3 | tail -1) 407 ;; 408 (*:hpux*) 409 libcpath="/usr/lib/hpux32/libc.so.1" 410 ;; 411 (*:osf*) 412 libcpath="/shlib/libc.so" 413 ;; 414 (*:solaris*) 415 libcpath="/lib/libc.so.1" 416 ;; 417 (*:darwin*) 418 libcpath="/usr/lib/libSystem.dylib" 419 DLSUFFIX=".dylib" 420 LDLIBPATHVAR="DYLD_LIBRARY_PATH" 421 LDPRELOADVAR="DYLD_INSERT_LIBRARIES" 422 LDPRELOADABS=1 423 ;; 424 (*) 425 AC_MSG_WARN([don't know where libc is for $target_os on 426 $target_cpu, setting to /lib/libc.so]) 427 libcpath="/lib/libc.so" 428 ;; 429esac 430 431AC_DEFINE_UNQUOTED([LIBCPATH], "$libcpath", [path to libc shared object]) 432AC_SUBST(DLSUFFIX) 433AC_SUBST(LDLIBPATHVAR) 434AC_SUBST(LDPRELOADVAR) 435AC_SUBST(LDPRELOADABS) 436AC_SUBST(LDEXTRAVAR) 437 438dnl Checks for library functions. 439AC_CHECK_FUNCS(strdup strstr getresuid setresuid getresgid setresgid setfsuid setfsgid fts_read fts_children) 440 441AC_CHECK_DECLS([setenv, unsetenv]) 442AC_REPLACE_FUNCS([setenv]) 443 444dnl Checks for __builtin_expect 445AC_LINK_IFELSE([AC_LANG_PROGRAM([[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]], 446 [[]])],[AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, 447 [Define to 1 if the compiler understands __builtin_expect.])],[]) 448 449dnl kludge 450AH_VERBATIM([WRAP_STAT], 451[/* Stuff. */ 452#define WRAP_STAT __astat 453#define WRAP_STAT_QUOTE __astat 454#define WRAP_STAT_RAW __astat 455#define TMP_STAT __astat 456#define NEXT_STAT_NOARG next___astat 457 458#define WRAP_LSTAT_QUOTE __astat 459#define WRAP_LSTAT __astat 460#define WRAP_LSTAT_RAW __astat 461#define TMP_LSTAT __astat 462#define NEXT_LSTAT_NOARG next___astat 463 464#define WRAP_FSTAT_QUOTE __astat 465#define WRAP_FSTAT __astat 466#define WRAP_FSTAT_RAW __astat 467#define TMP_FSTAT __astat 468#define NEXT_FSTAT_NOARG next___astat 469 470#define WRAP_FSTATAT_QUOTE __astatat 471#define WRAP_FSTATAT __astatat 472#define WRAP_FSTATAT_RAW __astatat 473#define TMP_FSTATAT __astatat 474#define NEXT_FSTATAT_NOARG next___astatat 475 476#define WRAP_STAT64_QUOTE __astat64 477#define WRAP_STAT64 __astat64 478#define WRAP_STAT64_RAW __astat64 479#define TMP_STAT64 __astat64 480#define NEXT_STAT64_NOARG next___astat64 481 482#define WRAP_LSTAT64_QUOTE __astat64 483#define WRAP_LSTAT64 __astat64 484#define WRAP_LSTAT64_RAW __astat64 485#define TMP_LSTAT64 __astat64 486#define NEXT_LSTAT64_NOARG next___astat64 487 488#define WRAP_FSTAT64_QUOTE __astat64 489#define WRAP_FSTAT64 __astat64 490#define WRAP_FSTAT64_RAW __astat64 491#define TMP_FSTAT64 __astat64 492#define NEXT_FSTAT64_NOARG next___astat64 493 494#define WRAP_FSTATAT64_QUOTE __astatat64 495#define WRAP_FSTATAT64 __astatat64 496#define WRAP_FSTATAT64_RAW __astatat64 497#define TMP_FSTATAT64 __astatat64 498#define NEXT_FSTATAT64_NOARG next___astatat64 499 500#define WRAP_MKNOD_QUOTE __amknod 501#define WRAP_MKNOD __amknod 502#define WRAP_MKNOD_RAW __amknod 503#define TMP_MKNOD __amknod 504#define NEXT_MKNOD_NOARG next___amknod 505 506#define WRAP_MKNODAT_QUOTE __amknodat 507#define WRAP_MKNODAT __amknodat 508#define WRAP_MKNODAT_RAW __amknodat 509#define TMP_MKNODAT __amknodat 510#define NEXT_MKNODAT_NOARG next___amknodat 511]) 512dnl kludge end 513 514dnl check for b0rked Solaris (and other shells) and find one that works 515_AS_DETECT_REQUIRED([echo $(echo ok) > config.$$ 2>/dev/null 516 j=`cat config.$$` 517 test "x$j" = "xok"]) 518 519case "$target_cpu:$target_os" in 520 (alpha*:linux*) 521 AH_TEMPLATE([STUPID_ALPHA_HACK], [stat-struct conversion hackery]) 522 AC_MSG_CHECKING([if we need to do stat-struct conversion hackery]) 523 AC_EGREP_CPP([3:3],[ 524#include <sys/stat.h> 525_STAT_VER:_STAT_VER_GLIBC2_3_4 526], 527 [AC_MSG_RESULT([yes]); AC_DEFINE(STUPID_ALPHA_HACK) 528CPPFLAGS="$CPPFLAGS -I\$(srcdir)/statconv/glibc/linux/alpha" 529], 530 [AC_MSG_RESULT([no]);]) 531 ;; 532esac 533 534dnl AH_TEMPLATE([MACOSX], [is __APPLE__ defined by the compiler]) 535AC_MSG_CHECKING([for MacOS X/Darwin]) 536 AC_PREPROC_IFELSE( 537 [AC_LANG_PROGRAM([[ 538 #ifndef __APPLE__ 539 #error We are somewhere better 540 #endif 541 ]])], 542 [macosx=true 543 AC_MSG_RESULT([yes])], 544 [AC_MSG_RESULT([no]) 545 macosx=false] 546 ) 547AM_CONDITIONAL([MACOSX], [test x$macosx = xtrue]) 548 549AC_CONFIG_FILES([ 550 Makefile 551 scripts/Makefile 552 doc/Makefile 553 doc/de/Makefile doc/es/Makefile doc/fr/Makefile doc/nl/Makefile doc/pt/Makefile doc/sv/Makefile 554 test/Makefile test/defs]) 555AC_OUTPUT 556 557dnl Local variables: 558dnl mode: m4 559dnl End: 560