X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=configure.in;h=1c107098d246ef6e5d13af149acacc9ad06916ca;hb=2bf71d3ccf20c072bc67a9d075b6ac8b0798021e;hp=eaa9488fc0833d73ceb2e4507e5ea33dd05781df;hpb=e2e9041cdb2c8fe09af3eb4ca6e70e6675fd1c82;p=netatalk.git diff --git a/configure.in b/configure.in index eaa9488f..1c107098 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.237 2010-01-26 18:13:48 franklahm Exp $ +dnl $Id: configure.in,v 1.238 2010-02-10 14:05:36 franklahm Exp $ dnl configure.in for netatalk AC_INIT(etc/afpd/main.c) @@ -1152,6 +1152,35 @@ if test "x$neta_cv_eas_sys_found" = "xyes" ; then fi fi +dnl --------------------- Check if realpath() takes NULL +AC_CACHE_CHECK([if the realpath function allows a NULL argument], + neta_cv_REALPATH_TAKES_NULL, [ + AC_TRY_RUN([ + #include + #include + #include + + void exit_on_core(int ignored) { + exit(1); + } + + main() { + char *newpath; + signal(SIGSEGV, exit_on_core); + newpath = realpath("/tmp", NULL); + exit((newpath != NULL) ? 0 : 1); + }], + neta_cv_REALPATH_TAKES_NULL=yes, + neta_cv_REALPATH_TAKES_NULL=no, + neta_cv_REALPATH_TAKES_NULL=cross + ) + ] +) + +if test x"$neta_cv_REALPATH_TAKES_NULL" = x"yes"; then + AC_DEFINE(REALPATH_TAKES_NULL,1,[Whether the realpath function allows NULL]) +fi + dnl --------------------- Netatalk Webmin NETATALK_WEBMIN