]> granicus.if.org Git - graphviz/commitdiff
Add function checks from configure.ac to CMake
authorErwin Janssen <erwinjanssen@outlook.com>
Thu, 9 Feb 2017 07:11:01 +0000 (08:11 +0100)
committerErwin Janssen <erwinjanssen@outlook.com>
Thu, 6 Apr 2017 19:38:02 +0000 (21:38 +0200)
Checks for the following functions were added to the CMake build:
- _NSGetEnviron
- getenv
- lrand48
- setenv
- setmode

cmake/config_checks.cmake
config-cmake.h.in

index dd9778fbd16a8d34893c753e437d8310d1468b2d..ac53cc8a6afcd878d78145ef18552aecf7f22aa7 100644 (file)
@@ -24,12 +24,17 @@ check_include_file( X11/Xaw/Text.h      HAVE_X11_XAW_TEXT_H     )
 # Function checks
 include(CheckFunctionExists)
 
+check_function_exists( _NSGetEnviron    HAVE__NSGETENVIRON  )
 check_function_exists( drand48          HAVE_DRAND48        )
 check_function_exists( cbrt             HAVE_CBRT           )
 check_function_exists( getpagesize      HAVE_GETPAGESIZE    )
+check_function_exists( getenv           HAVE_GETENV         )
+check_function_exists( lrand48          HAVE_LRAND48        )
 check_function_exists( mallinfo         HAVE_MALLINFO       )
 check_function_exists( mallopt          HAVE_MALLOPT        )
 check_function_exists( mstats           HAVE_MSTATS         )
+check_function_exists( setenv           HAVE_SETENV         )
+check_function_exists( setmode          HAVE_SETMODE        )
 check_function_exists( sincos           HAVE_SINCOS         )
 check_function_exists( srand48          HAVE_SRAND48        )
 check_function_exists( strcasecmp       HAVE_STRCASECMP     )
@@ -55,6 +60,14 @@ if (LTDL_FOUND)
 endif()
 
 # Values
+if (WIN32)
+    set(BROWSER start)
+elseif (APPLE)
+    set(BROWSER open)
+else ()
+    set(BROWSER xdg-open)
+endif ()
+
 set(DEFAULT_DPI 96)
 
 # Write check results to config.h header
index de5ddfe07cf024cfc2cfb7361e16e7764aa2b6ac..81212269b3f7d3176b5fe45782f1df5b46da9a37 100644 (file)
@@ -1,7 +1,3 @@
-// Values
-#define GVPLUGIN_CONFIG_FILE "@GVPLUGIN_CONFIG_FILE@"
-#define PACKAGE_VERSION "@GRAPHVIZ_VERSION_FULL@"
-
 // Include headers
 #cmakedefine HAVE_CRT_EXTERNS_H
 #cmakedefine HAVE_FCNTL_H
 #cmakedefine HAVE_X11_XAW_TEXT_H
 
 // Functions
+#cmakedefine HAVE__NSGETENVIRON
 #cmakedefine HAVE_DRAND48
 #cmakedefine HAVE_CBRT
 #cmakedefine HAVE_GETPAGESIZE
+#cmakedefine HAVE_GETENV
+#cmakedefine HAVE_LRAND48
 #cmakedefine HAVE_MALLINFO
 #cmakedefine HAVE_MALLOPT
 #cmakedefine HAVE_MSTATS
+#cmakedefine HAVE_SETENV
+#cmakedefine HAVE_SETMODE
 #cmakedefine HAVE_SINCOS
 #cmakedefine HAVE_SRAND48
 #cmakedefine HAVE_STRCASECMP
@@ -51,4 +52,7 @@ typedef int ssize_t;
 #cmakedefine HAVE_ZLIB
 
 // Values
+#define BROWSER "@BROWSER@"
 #define DEFAULT_DPI @DEFAULT_DPI@
+#define GVPLUGIN_CONFIG_FILE "@GVPLUGIN_CONFIG_FILE@"
+#define PACKAGE_VERSION "@GRAPHVIZ_VERSION_FULL@"