r18443: add object files only when needed
[Samba.git] / source / lib / replace / getpass.m4
blob20d04a63f65536883648cf9a1c369974e808492e
1 AC_CACHE_CHECK([whether getpass should be replaced],samba_cv_REPLACE_GETPASS,[
2 SAVE_CPPFLAGS="$CPPFLAGS"
3 CPPFLAGS="$CPPFLAGS -I$libreplacedir/"
4 AC_TRY_COMPILE([
5 #include "confdefs.h"
6 #define _LIBREPLACE_REPLACE_H
7 #define REPLACE_GETPASS 1
8 #define main dont_declare_main
9 #include "$libreplacedir/getpass.c"
10 #undef main
11 ],[],samba_cv_REPLACE_GETPASS=yes,samba_cv_REPLACE_GETPASS=no)
12 CPPFLAGS="$SAVE_CPPFLAGS"
14 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
15         AC_DEFINE(REPLACE_GETPASS,1,[Whether getpass should be replaced])
16         LIBREPLACEOBJ="${LIBREPLACEOBJ} getpass.o"