source: trunk/server/lib/replace/getpass.m4@ 1000

Last change on this file since 1000 was 898, checked in by Silvan Scherrer, 9 years ago

Samba Server: get rid of configure, adjust build.cmd heavily, rename version files

File size: 1.1 KB
Line 
1AC_CHECK_FUNC(getpass, libreplace_cv_HAVE_GETPASS=yes)
2AC_CHECK_FUNC(getpassphrase, libreplace_cv_HAVE_GETPASSPHRASE=yes)
3if test x"$libreplace_cv_HAVE_GETPASS" = x"yes" -a x"$libreplace_cv_HAVE_GETPASSPHRASE" = x"yes"; then
4 AC_DEFINE(REPLACE_GETPASS_BY_GETPASSPHRASE, 1, [getpass returns <9 chars where getpassphrase returns <265 chars])
5 AC_DEFINE(REPLACE_GETPASS,1,[Whether getpass should be replaced])
6 LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
7else
8
9AC_CACHE_CHECK([whether getpass should be replaced],libreplace_cv_REPLACE_GETPASS,[
10SAVE_CPPFLAGS="$CPPFLAGS"
11CPPFLAGS="$CPPFLAGS -I$libreplacedir/"
12AC_TRY_COMPILE([
13#include "confdefs.h"
14#define NO_CONFIG_H
15#include "$libreplacedir/getpass.c"
16],[],libreplace_cv_REPLACE_GETPASS=yes,libreplace_cv_REPLACE_GETPASS=no)
17CPPFLAGS="$SAVE_CPPFLAGS"
18
19# on OS/2 libc getpass is ok, no need to replace
20case "$host_os" in
21 *os2*)
22 libreplace_cv_REPLACE_GETPASS=no
23 ;;
24esac
25])
26
27if test x"$libreplace_cv_REPLACE_GETPASS" = x"yes"; then
28 AC_DEFINE(REPLACE_GETPASS,1,[Whether getpass should be replaced])
29 LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/getpass.o"
30fi
31
32fi
Note: See TracBrowser for help on using the repository browser.