gnupg.m4 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # gnupg.m4 - autoconf macros as used by GnuPG.
  2. # Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
  3. #
  4. # This file is free software; as a special exception the author gives
  5. # unlimited permission to copy and/or distribute it, with or without
  6. # modifications, as long as this notice is preserved.
  7. #
  8. # This file is distributed in the hope that it will be useful, but
  9. # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
  10. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. dnl Stolen from gcc
  12. dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
  13. dnl of the usual 2.
  14. AC_DEFUN([GNUPG_FUNC_MKDIR_TAKES_ONE_ARG],
  15. [AC_CHECK_HEADERS(sys/stat.h unistd.h direct.h)
  16. AC_CACHE_CHECK([if mkdir takes one argument], gnupg_cv_mkdir_takes_one_arg,
  17. [AC_TRY_COMPILE([
  18. #include <sys/types.h>
  19. #ifdef HAVE_SYS_STAT_H
  20. # include <sys/stat.h>
  21. #endif
  22. #ifdef HAVE_UNISTD_H
  23. # include <unistd.h>
  24. #endif
  25. #ifdef HAVE_DIRECT_H
  26. # include <direct.h>
  27. #endif], [mkdir ("foo", 0);],
  28. gnupg_cv_mkdir_takes_one_arg=no, gnupg_cv_mkdir_takes_one_arg=yes)])
  29. if test $gnupg_cv_mkdir_takes_one_arg = yes ; then
  30. AC_DEFINE(MKDIR_TAKES_ONE_ARG,1,
  31. [Defined if mkdir() does not take permission flags])
  32. fi
  33. ])