From 8dcf8cfe66e5d94f62f07b1710210236c01a8f97 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 19 Feb 2015 16:02:11 -0700 Subject: [PATCH] gpfswrap: Move gpfswrap to lib/util Signed-off-by: Christof Schmitt Reviewed-by: Amitay Isaacs --- {source3/modules => lib/util}/gpfswrap.c | 0 {source3/modules => lib/util}/gpfswrap.h | 0 lib/util/wscript_build | 12 +++++++++++- lib/util/wscript_configure | 4 ++++ source3/modules/vfs_gpfs.c | 2 +- source3/modules/wscript_build | 4 ++-- source3/wscript | 4 ---- 7 files changed, 18 insertions(+), 8 deletions(-) rename {source3/modules => lib/util}/gpfswrap.c (100%) rename {source3/modules => lib/util}/gpfswrap.h (100%) diff --git a/source3/modules/gpfswrap.c b/lib/util/gpfswrap.c similarity index 100% rename from source3/modules/gpfswrap.c rename to lib/util/gpfswrap.c diff --git a/source3/modules/gpfswrap.h b/lib/util/gpfswrap.h similarity index 100% rename from source3/modules/gpfswrap.h rename to lib/util/gpfswrap.h diff --git a/lib/util/wscript_build b/lib/util/wscript_build index 182f80af35e..50d53ed63f1 100755 --- a/lib/util/wscript_build +++ b/lib/util/wscript_build @@ -28,9 +28,19 @@ bld.SAMBA_SUBSYSTEM('close-low-fd', deps='replace', local_include=False) +samba_debug_add_deps = '' + +if bld.CONFIG_SET('HAVE_GPFS'): + bld.SAMBA_SUBSYSTEM('gpfswrap', + source='gpfswrap.c', + deps='replace', + local_include=False, + includes=bld.CONFIG_GET('CPPPATH_GPFS')) + samba_debug_add_deps += ' gpfswrap' + bld.SAMBA_LIBRARY('samba-debug', source='debug.c', - deps='replace time-basic close-low-fd talloc socket-blocking', + deps='replace time-basic close-low-fd talloc socket-blocking' + samba_debug_add_deps, public_deps='systemd-journal lttng-ust', local_include=False, private_library=True) diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure index 84c3414334b..ddd48824121 100644 --- a/lib/util/wscript_configure +++ b/lib/util/wscript_configure @@ -141,3 +141,7 @@ if (conf.CONFIG_SET('HAVE_LTTNG_TRACEF_H') and else: conf.SET_TARGET_TYPE('lttng-ust', 'EMPTY') conf.undefine('HAVE_LTTNG_TRACEF') + +conf.env['CPPPATH_GPFS'] = '/usr/lpp/mmfs/include/' +if conf.CHECK_HEADERS('gpfs_fcntl.h', False, False, "gpfs"): + conf.DEFINE('HAVE_GPFS', '1') diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 999e83b16a0..8d9d897702c 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -30,7 +30,7 @@ #include "system/filesys.h" #include "auth.h" #include "lib/util/tevent_unix.h" -#include "gpfswrap.h" +#include "lib/util/gpfswrap.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_VFS diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build index a4afcd7ed09..018cbe91378 100644 --- a/source3/modules/wscript_build +++ b/source3/modules/wscript_build @@ -275,8 +275,8 @@ bld.SAMBA3_MODULE('vfs_commit', bld.SAMBA3_MODULE('vfs_gpfs', subsystem='vfs', - source='vfs_gpfs.c gpfswrap.c', - deps='NFS4_ACLS non_posix_acls', + source='vfs_gpfs.c', + deps='NFS4_ACLS non_posix_acls gpfswrap', init_function='', internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_gpfs'), enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_gpfs'), diff --git a/source3/wscript b/source3/wscript index ffff44df1aa..818cdad817d 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1506,10 +1506,6 @@ main() { Logs.warn("pthreadpool support cannot be enabled when pthread support was not found") conf.undefine('WITH_PTHREADPOOL') - conf.env['CPPPATH_GPFS'] = '/usr/lpp/mmfs/include/' - if conf.CHECK_HEADERS('gpfs_fcntl.h', False, False, "gpfs"): - conf.DEFINE('HAVE_GPFS', '1') - if (conf.CHECK_HEADERS('linux/ioctl.h sys/ioctl.h linux/fs.h') and conf.CHECK_DECLS('FS_IOC_GETFLAGS FS_COMPR_FL', headers='linux/fs.h')): conf.DEFINE('HAVE_LINUX_IOCTL', '1') -- 2.34.1