Code

cmake: add many config define checks
authorjohanengelen <johanengelen@users.sourceforge.net>
Mon, 7 Apr 2008 20:52:45 +0000 (20:52 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Mon, 7 Apr 2008 20:52:45 +0000 (20:52 +0000)
CMakeScripts/ConfigInkscapeDepends.cmake

index 36a6d66a0e8eec63e251d172ebddb45fb146ddb5..a7a8d5df2d3c7c9ec29debbe95a1b2831d62eea9 100644 (file)
@@ -76,27 +76,58 @@ message(STATUS "")
 \r
 SET(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} -j2")\r
 \r
+#---------------\r
+# From here on:\r
+# Set all HAVE_XXX variables, to correctly set all defines in config.h\r
+\r
 INCLUDE (CheckIncludeFiles)\r
+INCLUDE (CheckFunctionExists)\r
+#INCLUDE (CheckStructMember)\r
 # usage: CHECK_INCLUDE_FILES (<header> <RESULT_VARIABLE> )\r
+# usage: CHECK_FUNCTION_EXISTS (<function name> <RESULT_VARIABLE> )\r
+# usage: CHECK_STRUCT_MEMBER (<struct> <member> <header> <RESULT_VARIABLE>)\r
 \r
-CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)\r
 CHECK_INCLUDE_FILES (boost/concept_check.hpp HAVE_BOOST_CONCEPT_CHECK_HPP)\r
-CHECK_INCLUDE_FILES ("cairo-pdf.h" HAVE_CAIRO_PDF)\r
+CHECK_INCLUDE_FILES (cairo-pdf.h HAVE_CAIRO_PDF)\r
+CHECK_FUNCTION_EXISTS(floor HAVE_FLOOR)\r
+CHECK_FUNCTION_EXISTS(fpsetmask HAVE_FPSETMASK)\r
 CHECK_INCLUDE_FILES (gc/gc.h HAVE_GC_GC_H)\r
 CHECK_INCLUDE_FILES (gc.h HAVE_GC_H)\r
 CHECK_INCLUDE_FILES (getopt.h HAVE_GETOPT_H)\r
+CHECK_FUNCTION_EXISTS(gettext HAVE_GETTEXT)\r
+CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)\r
+CHECK_FUNCTION_EXISTS(gtk_window_fullscreen HAVE_GTK_WINDOW_FULLSCREEN)\r
+CHECK_FUNCTION_EXISTS(gtk_window_set_default_icon_from_file HAVE_GTK_WINDOW_SET_DEFAULT_ICON_FROM_FILE)\r
 CHECK_INCLUDE_FILES (ieeefp.h HAVE_IEEEFP_H)\r
 CHECK_INCLUDE_FILES (inttypes.h HAVE_INTTYPES_H)\r
 CHECK_INCLUDE_FILES (locale.h HAVE_LC_MESSAGES)\r
 CHECK_INCLUDE_FILES (locale.h HAVE_LOCALE_H)\r
 CHECK_INCLUDE_FILES (libintl.h HAVE_LIBINTL_H)\r
 CHECK_INCLUDE_FILES (fcntl.h HAVE_FCNTL_H)\r
+CHECK_FUNCTION_EXISTS(mallinfo HAVE_MALLINFO)\r
+CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)\r
+CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)\r
 CHECK_INCLUDE_FILES (memory.h HAVE_MEMORY_H)\r
+CHECK_FUNCTION_EXISTS(memset HAVE_MEMSET)\r
+CHECK_FUNCTION_EXISTS(mkdir HAVE_MKDIR)\r
+CHECK_FUNCTION_EXISTS(pow HAVE_POW)\r
+CHECK_FUNCTION_EXISTS(sqrt HAVE_SQRT)\r
 CHECK_INCLUDE_FILES (stddef.h HAVE_STDDEF_H)\r
 CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H)\r
 CHECK_INCLUDE_FILES (stdlib.h HAVE_STDLIB_H)\r
 CHECK_INCLUDE_FILES (strings.h HAVE_STRINGS_H)\r
 CHECK_INCLUDE_FILES (string.h HAVE_STRING_H)\r
+CHECK_FUNCTION_EXISTS(strncasecmp HAVE_STRNCASECMP)\r
+CHECK_FUNCTION_EXISTS(strpbrk HAVE_STRPBRK)\r
+CHECK_FUNCTION_EXISTS(strrchr HAVE_STRRCHR)\r
+CHECK_FUNCTION_EXISTS(strspn HAVE_STRSPN)\r
+CHECK_FUNCTION_EXISTS(strstr HAVE_STRSTR)\r
+CHECK_FUNCTION_EXISTS(strtoul HAVE_STRTOUL)\r
+#CHECK_STRUCT_MEMBER(fordblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_FORDBLKS)\r
+#CHECK_STRUCT_MEMBER(fsmblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_FSMBLKS)\r
+#CHECK_STRUCT_MEMBER(hblkhd mallinfo malloc.h HAVE_STRUCT_MALLINFO_HBLKHD)\r
+#CHECK_STRUCT_MEMBER(uordblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_UORDBLKS)\r
+#CHECK_STRUCT_MEMBER(usmblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_USMBLKS)\r
 CHECK_INCLUDE_FILES (sys/filio.h HAVE_SYS_FILIO_H)\r
 CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)\r
 CHECK_INCLUDE_FILES (sys/time.h HAVE_SYS_TIME_H)\r
@@ -105,8 +136,10 @@ CHECK_INCLUDE_FILES (unistd.h HAVE_UNISTD_H)
 CHECK_INCLUDE_FILES (zlib.h HAVE_ZLIB_H)\r
 \r
 # Enable pango defines, necessary for compilation on Win32, how about Linux?\r
-SET(PANGO_ENABLE_ENGINE TRUE)\r
-SET(RENDER_WITH_PANGO_CAIRO TRUE)\r
+IF (HAVE_CAIRO_PDF)\r
+    SET(PANGO_ENABLE_ENGINE TRUE)\r
+    SET(RENDER_WITH_PANGO_CAIRO TRUE)\r
+ENDIF(HAVE_CAIRO_PDF)\r
 \r
 # Create the two configuration files: config.h and inkscape_version.h\r
 # Create them in the binary root dir\r