summaryrefslogtreecommitdiff
path: root/config.h.cmake
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2015-06-27 12:28:38 -0400
committerAllen Winter <allen.winter@kdab.com>2015-06-27 12:28:38 -0400
commit59575333ba6f80f9a0f864fd048461c2355529a1 (patch)
tree3b1f32e62dc4f679a1802d9ac0787d3b785678e0 /config.h.cmake
parent7e965ef05f41de77b53878bf59da1e1ed1cf95df (diff)
downloadlibical-git-59575333ba6f80f9a0f864fd048461c2355529a1.tar.gz
use cmake for getopt() discovery
Diffstat (limited to 'config.h.cmake')
-rw-r--r--config.h.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/config.h.cmake b/config.h.cmake
index 80fd57b9..8461a3da 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -87,6 +87,9 @@
/* Define to 1 if you have the `_access' function. */
#cmakedefine HAVE__ACCESS 1
+/* Define to 1 if you have the `getopt' function. */
+#cmakedefine HAVE_GETOPT 1
+
/* Define to 1 if you have the `getpid' function. */
#cmakedefine HAVE_GETPID 1
@@ -346,6 +349,15 @@ typedef unsigned int wint_t;
#endif
#endif
+/* getopt - function to parse command-line options */
+#if defined(HAVE_GETOPT)
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#else
+#error "No parse command-line function available"
+#endif
+
/* getpid - system function to get process identification */
#if defined(HAVE__GETPID)
#include <process.h>