autoconf: split into subdirectories; redirect calls in debug builds
[m6w6/ext-psi] / m4 / posix / glob.m4
diff --git a/m4/posix/glob.m4 b/m4/posix/glob.m4
new file mode 100644 (file)
index 0000000..f727d5e
--- /dev/null
@@ -0,0 +1,31 @@
+PSI_CHECK_GLOB() {
+    PSI_CONFIG_POSIX(glob, glob.h)
+    
+    PSI_STRUCT(glob_t, [
+        size_t gl_pathc,
+        int gl_matchc,
+        size_t gl_offs,
+        int gl_flags,
+        char **gl_pathv])
+
+       PSI_FUNCTOR_TYPE(int glob_err, [(const char *epath, int eerrno)])
+    PSI_DECL(int glob, [(char *path, int flags, glob_err err, glob_t *buf)])
+    PSI_DECL(void globfree, [(glob_t *buf)])
+
+    PSI_CONST(GLOB_APPEND, int)
+    PSI_CONST(GLOB_BRACE, int)
+    PSI_CONST(GLOB_DOOFFS, int)
+    PSI_CONST(GLOB_ERR, int)
+    PSI_CONST(GLOB_MARK, int)
+    PSI_CONST(GLOB_NOCHECK, int)
+    PSI_CONST(GLOB_NOESCAPE, int)
+    PSI_CONST(GLOB_NOMAGIC, int)
+    PSI_CONST(GLOB_NOSORT, int)
+    PSI_CONST(GLOB_ONLYDIR, int)
+    PSI_CONST(GLOB_PERIOD, int)
+    PSI_CONST(GLOB_TILDE, int)
+    PSI_CONST(GLOB_TILDE_CHECK, int)
+    PSI_CONST(GLOB_ABORTED, int)
+    PSI_CONST(GLOB_NOMATCH, int)
+    PSI_CONST(GLOB_NOSPACE, int)
+}