From: Andrew Bartlett Date: Sat, 29 Sep 2012 04:28:57 +0000 (+1000) Subject: build: Fix quota tests, including move of sysquotas.c to the top level X-Git-Tag: ldb-1.1.14~440 X-Git-Url: http://git.samba.org/samba.git/?p=garming%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=006bdc0be0bf2ef70b3eb24d679bd49f6d8079fd build: Fix quota tests, including move of sysquotas.c to the top level This correctly detects quotas on FreeBSD Andrew Bartlett --- diff --git a/source3/configure.in b/source3/configure.in index 5045742cd46..d47f08a4a7a 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -4617,7 +4617,7 @@ AC_TRY_RUN_STRICT([ #define HAVE_QUOTACTL_4A 1 #define AUTOCONF_TEST 1 #include "confdefs.h" -#include "${srcdir-.}/../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], +#include "${srcdir-.}/../../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], samba_cv_HAVE_QUOTACTL_4A=yes,samba_cv_HAVE_QUOTACTL_4A=no,samba_cv_HAVE_QUOTACTL_4A=cross)]) if test x"$samba_cv_HAVE_QUOTACTL_4A" = x"yes"; then samba_cv_SYSQUOTA_FOUND=yes; @@ -4631,7 +4631,7 @@ AC_TRY_RUN_STRICT([ #define HAVE_QUOTACTL_4B 1 #define AUTOCONF_TEST 1 #include "confdefs.h" -#include "${srcdir-.}/../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], +#include "${srcdir-.}/../../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS], samba_cv_HAVE_QUOTACTL_4B=yes,samba_cv_HAVE_QUOTACTL_4B=no,samba_cv_HAVE_QUOTACTL_4B=cross)]) if test x"$samba_cv_HAVE_QUOTACTL_4B" = x"yes"; then samba_cv_SYSQUOTA_FOUND=yes; diff --git a/source3/wscript b/source3/wscript index 3815c7ccdb1..336b277a566 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1238,23 +1238,24 @@ main() { if not conf.CHECK_CODE(''' #define HAVE_QUOTACTL_4A 1 #define AUTOCONF_TEST 1 - #include "confdefs.h" - #include "${srcdir-.}/../tests/sysquotas.c" + #include "../tests/sysquotas.c" ''', + cflags=conf.env['WERROR_CFLAGS'], define='HAVE_QUOTACTL_4A', msg='for QUOTACTL_4A: long quotactl(int cmd, char *special, qid_t id, caddr_t addr)', execute=True, - local_include=False): + addmain=False): + conf.CHECK_CODE(''' #define HAVE_QUOTACTL_4B 1 #define AUTOCONF_TEST 1 - #include "confdefs.h" - #include "${srcdir-.}/../tests/sysquotas.c" + #include "../tests/sysquotas.c" ''', + cflags=conf.env['WERROR_CFLAGS'], define='HAVE_QUOTACTL_4B', msg='for QUOTACTL_4B: int quotactl(const char *path, int cmd, int id, char *addr)', execute=True, - local_include=False) + addmain=False) conf.CHECK_CODE(''' clnt_create("", RQUOTAPROG, RQUOTAVERS, "udp"); diff --git a/source3/tests/sysquotas.c b/tests/sysquotas.c similarity index 99% rename from source3/tests/sysquotas.c rename to tests/sysquotas.c index 1544dca7cfb..afec3f16244 100644 --- a/source3/tests/sysquotas.c +++ b/tests/sysquotas.c @@ -42,7 +42,7 @@ extern int quotactl(int cmd, const char *special, uid_t uid, void *addr); struct SYS_DQBLK D; ret = quotactl(Q_GETQUOTA,"/dev/hda1",0,(void *)&D); - + return ret; } @@ -84,7 +84,7 @@ extern int quotactl(int cmd, const char *special, uid_t uid, void *addr); #endif int main(void) -{ +{ autoconf_quota(); return 0; }