diff --git a/src/cdi.h b/src/cdi.h
index 32e8e7cbb9beddb629833c771dd2e9936ca59524..d72ad37531e5a86ef12bfc8b5253a374eb29652b 100644
--- a/src/cdi.h
+++ b/src/cdi.h
@@ -1450,6 +1450,9 @@ extern int (*proj_stere_to_lonlat_func)(struct CDI_GridProjParams gpp, double, d
 // Used on CDO remap_scrip_io.cc
 void cdf_def_var_filter(int ncid, int ncvarID, const char *filterSpec);
 
+int cdi_has_dap();
+int cdi_has_cgribex();
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/cdi_int.c b/src/cdi_int.c
index 9fa2e190a390bde0c8b8beea8602a22cce3cc061..4972daa44c4752e6e1c0341c1baa6eb0267174c0 100644
--- a/src/cdi_int.c
+++ b/src/cdi_int.c
@@ -590,6 +590,24 @@ stream_def_accesstype(stream_t *s, int type)
     Error("Changing access type from %s not allowed!", s->accesstype == TYPE_REC ? "REC to VAR" : "VAR to REC");
 }
 
+int
+cdi_has_dap()
+{
+#ifdef HAVE_LIBNC_DAP
+  return 1;
+#endif
+  return 0;
+}
+
+int
+cdi_has_cgribex()
+{
+#ifdef HAVE_LIBCGRIBEX
+  return 1;
+#endif
+  return 0;
+}
+
 /*
  * Local Variables:
  * c-file-style: "Java"