]> Creatis software - gdcm.git/commitdiff
ENH: Small improvement to generate the proper header
authormalaterre <malaterre>
Sun, 22 May 2005 20:17:57 +0000 (20:17 +0000)
committermalaterre <malaterre>
Sun, 22 May 2005 20:17:57 +0000 (20:17 +0000)
src/gdcmjasper/src/libjasper/include/jasper/CMakeLists.txt
src/gdcmjasper/src/libjasper/include/jasper/jas_config.h.in

index 07d9a51ad6cce212dfd6224662f6f48555f06bdc..1d2a9ac8d4cbdedd9cdfdc7bb310e5c29fb21b83 100644 (file)
@@ -1,3 +1,4 @@
+INCLUDE_REGULAR_EXPRESSION("^(jas).*$")
 
 
 #libjasperinclude_HEADERS = \
 #  jas_version.h
 #
 #libjasperincludedir = $(includedir)/jasper
+
+SET(JAS_VERSION "1.701.0")
+
+CHECK_INCLUDE_FILE("dlfcn.h"       HAVE_DLFCN_H)
+CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H)
+CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
+CHECK_INCLUDE_FILE("io.h" HAVE_IO_H)
+#/* Define to 1 if you have the `m' library (-lm). */
+##define HAVE_LIBM 1
+
+CHECK_INCLUDE_FILE("limits.h" HAVE_LIMITS_H)
+CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H)
+CHECK_INCLUDE_FILE("stdbool.h" HAVE_STDBOOL_H)
+CHECK_INCLUDE_FILE("stddef.h" HAVE_STDDEF_H)
+CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H)
+CHECK_INCLUDE_FILE("stdlib.h" HAVE_STDLIB_H)
+CHECK_INCLUDE_FILE("strings.h" HAVE_STRINGS_H)
+CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H)
+CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
+CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H)
+CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H)
+
+#/* Have variable length arrays */
+##define HAVE_VLA 1
+
+#/* Define to 1 if you have the `vprintf' function. */
+##define HAVE_VPRINTF 1
+
+CHECK_INCLUDE_FILE("windows.h" HAVE_WINDOWS_H)
+# Big endian thing:
+INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
+TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
+
+CONFIGURE_FILE(
+  ${JASPER_SOURCE_DIR}/src/libjasper/include/jasper/jas_config.h.in
+  ${JASPER_BINARY_DIR}/src/libjasper/include/jasper/jas_config.h
+  @ONLY IMMEDIATE)
index ee7270b26cb0942c874e33856557e11c9f0138d2..a71c33252bb92fd28b4eda51597a9d6c9fd28225 100644 (file)
@@ -1,23 +1,11 @@
-/* src/libjasper/include/jasper/jas_config.h.in.  Generated from configure.ac by autoheader.  */
+/* src/libjasper/include/jasper/jas_config.h.in.  Template for cmake.  */
 
 
 /* Avoid problems due to multiple inclusion. */
 #ifndef JAS_CONFIG_H
 #define JAS_CONFIG_H
 
-/* This preprocessor symbol identifies the version of JasPer. */
-#undef  JAS_VERSION
-/* If configure is being used, this symbol will be defined automatically
-  at this point in the configuration header file. */
-
-/* The preprocessor symbol JAS_WIN_MSVC_BUILD should not be defined
-  unless the JasPer software is being built under Microsoft Windows
-  using Microsoft Visual C. */
-#ifndef  JAS_WIN_MSVC_BUILD
-/* A configure-based build is being used. */
-
-
-
+#if 0
 /* Extra debugging support */
 #undef DEBUG
 
 
 /* Debugging overflow detection */
 #undef DEBUG_OVERFLOW
+#endif
 
 /* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
+#cmakedefine HAVE_DLFCN_H
 
 /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#undef HAVE_DOPRNT
+/* #undef HAVE_DOPRNT */
 
 /* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
+#cmakedefine HAVE_FCNTL_H
 
 /* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
+#cmakedefine HAVE_INTTYPES_H
 
 /* Define to 1 if you have the <io.h> header file. */
-#undef HAVE_IO_H
+#cmakedefine HAVE_IO_H
 
-/* Define to 1 if you have the `m' library (-lm). */
-#undef HAVE_LIBM
+///* Define to 1 if you have the `m' library (-lm). */
+//#define HAVE_LIBM 1
 
 /* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
+#cmakedefine HAVE_LIMITS_H
 
 /* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
+#cmakedefine HAVE_MEMORY_H
 
 /* Define to 1 if you have the <stdbool.h> header file. */
-#undef HAVE_STDBOOL_H
+#cmakedefine HAVE_STDBOOL_H
 
 /* Define to 1 if you have the <stddef.h> header file. */
-#undef HAVE_STDDEF_H
+#cmakedefine HAVE_STDDEF_H
 
 /* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
+#cmakedefine HAVE_STDINT_H
 
 /* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
+#cmakedefine HAVE_STDLIB_H
 
 /* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
+#cmakedefine HAVE_STRINGS_H
 
 /* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
+#cmakedefine HAVE_STRING_H
 
 /* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
+#cmakedefine HAVE_SYS_STAT_H
 
 /* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
+#cmakedefine HAVE_SYS_TYPES_H
 
 /* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
+#cmakedefine HAVE_UNISTD_H
 
-/* Have variable length arrays */
-#undef HAVE_VLA
+///* Have variable length arrays */
+//#define HAVE_VLA 1
 
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
+///* Define to 1 if you have the `vprintf' function. */
+//#define HAVE_VPRINTF 1
 
 /* Define to 1 if you have the <windows.h> header file. */
-#undef HAVE_WINDOWS_H
+#cmakedefine HAVE_WINDOWS_H
 
 /* JasPer configure */
-#undef JAS_CONFIGURE
+#define JAS_CONFIGURE 1
 
 /* JasPer version */
-#undef JAS_VERSION
+#define JAS_VERSION "@JAS_VERSION@"
 
 /* Name of package */
-#undef PACKAGE
+#define PACKAGE "jasper"
 
 /* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
+#define PACKAGE_BUGREPORT ""
 
 /* Define to the full name of this package. */
-#undef PACKAGE_NAME
+#define PACKAGE_NAME "jasper"
 
 /* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
+#define PACKAGE_STRING "jasper @JAS_VERSION@"
 
 /* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
+#define PACKAGE_TARNAME "jasper"
 
 /* Define to the version of this package. */
-#undef PACKAGE_VERSION
+#define PACKAGE_VERSION "@JAS_VERSION@"
 
+#if 0
 /* The size of a `int', as computed by sizeof. */
-#undef SIZEOF_INT
+#define SIZEOF_INT 4
 
 /* The size of a `long', as computed by sizeof. */
-#undef SIZEOF_LONG
+#define SIZEOF_LONG 4
 
 /* The size of a `long long', as computed by sizeof. */
-#undef SIZEOF_LONG_LONG
+#define SIZEOF_LONG_LONG 8
 
 /* The size of a `short', as computed by sizeof. */
-#undef SIZEOF_SHORT
+#define SIZEOF_SHORT 2
 
 /* The size of a `unsigned int', as computed by sizeof. */
-#undef SIZEOF_UNSIGNED_INT
+#define SIZEOF_UNSIGNED_INT 4
 
 /* The size of a `unsigned long', as computed by sizeof. */
-#undef SIZEOF_UNSIGNED_LONG
+#define SIZEOF_UNSIGNED_LONG 4
 
 /* The size of a `unsigned long long', as computed by sizeof. */
-#undef SIZEOF_UNSIGNED_LONG_LONG
+#define SIZEOF_UNSIGNED_LONG_LONG 8
 
 /* The size of a `unsigned short', as computed by sizeof. */
-#undef SIZEOF_UNSIGNED_SHORT
+#define SIZEOF_UNSIGNED_SHORT 2
 
 /* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
+#define STDC_HEADERS 1
+#endif
 
 /* Version number of package */
-#undef VERSION
+#define VERSION "1.701.0"
 
 /* Define to 1 if your processor stores words with the most significant byte
    first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
+#cmakedefine WORDS_BIGENDIAN
 
 /* Define to 1 if the X Window System is missing or not being used. */
-#undef X_DISPLAY_MISSING
+//#define X_DISPLAY_MISSING 1
 
 /* Define to empty if `const' does not conform to ANSI C. */
-#undef const
+/* #undef const */
 
 /* Define as `__inline' if that's what the C compiler calls it, or to nothing
    if it is not supported. */
-#undef inline
+/* #undef inline */
 
+// I have #define for types...
+#if 0
 /* Define to `long long' if <sys/types.h> does not define. */
-#undef longlong
+#define longlong long long
 
 /* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
+/* #undef size_t */
 
 /* Define to `int' if <sys/types.h> does not define. */
-#undef ssize_t
+/* #undef ssize_t */
 
 /* Define to `unsigned char' if <sys/types.h> does not define. */
-#undef uchar
+#define uchar unsigned char
 
 /* Define to `unsigned int' if <sys/types.h> does not define. */
-#undef uint
+/* #undef uint */
 
 /* Define to `unsigned long' if <sys/types.h> does not define. */
-#undef ulong
+#define ulong unsigned long
 
 /* Define to `unsigned long long' if <sys/types.h> does not define. */
-#undef ulonglong
+#define ulonglong unsigned long long
 
 /* Define to `unsigned short' if <sys/types.h> does not define. */
-#undef ushort
-
+/* #undef ushort */
+#endif
 
-#else
-/* A configure-based build is not being used. */
-#include <jasper/jas_config2.h>
+#ifndef HAVE_SYS_TYPES_H
+typedef unsigned char      uchar;
+typedef unsigned short     ushort;
+typedef unsigned int       uint;
+typedef unsigned long      ulong;
+typedef long long          longlong;
+typedef unsigned long long ulonglong;
+/*#define  ssize_t    int*/
 #endif
 
 #endif