Move the QT_MACEXTRAS_LIB cmakedefine in cmakeconfig.h.in to the

equivalent location in config.h.in, to simplify comparing the two files.

Add some tests from the autoconf script to CMake:

	check for setresgid() and setresuid();

	check for struct stat having an st_flags member.

Get rid of INTTYPES_H_DEFINES_FORMATS; we don't appear to check for it,
and we don't use it (we're using GLib's formatting functions, which have
their own way of handling 64-bit integers).

Get rid of STDC_HEADERS; it's in autoconf because autoconf was
originally developed back when you couldn't rely in ANSI C and has never
been removed, and something we're using for other purposes checks for
it, not because we explicitly test for it, but we don't test it in the
code, and CMake doesn't even check for it.

svn path=/trunk/; revision=52522
This commit is contained in:
Guy Harris 2013-10-10 23:54:53 +00:00
parent 2f067f20dd
commit e5336d281b
2 changed files with 15 additions and 11 deletions

View File

@ -83,11 +83,14 @@ check_function_exists("mmap" HAVE_MMAP)
check_function_exists("mprotect" HAVE_MPROTECT)
check_function_exists("mkdtemp" HAVE_MKDTEMP)
check_function_exists("mkstemp" HAVE_MKSTEMP)
check_function_exists("setresgid" HAVE_SETRESGID)
check_function_exists("setresuid" HAVE_SETRESUID)
check_function_exists("sysconf" HAVE_SYSCONF)
#Struct members
include(CheckStructHasMember)
check_struct_has_member("struct tm" tm_zone time.h HAVE_TM_ZONE)
check_struct_has_member("struct stat" st_flags sys/stat.h HAVE_ST_FLAGS)
check_struct_has_member("struct tm" tm_zone time.h HAVE_TM_ZONE)
#Symbols but NOT enums or types
include(CheckSymbolExists)

View File

@ -135,9 +135,6 @@
/* Define to use libportaudio library */
#cmakedefine HAVE_LIBPORTAUDIO 1
/* Define if we have QtMacExtras */
#cmakedefine QT_MACEXTRAS_LIB 1
/* Define to 1 if you have the `smi' library (-lsmi). */
#cmakedefine HAVE_LIBSMI 1
@ -255,6 +252,12 @@
/* Define if sa_len field exists in struct sockaddr */
#cmakedefine HAVE_SA_LEN 1
/* Define to 1 if you have the `setresgid' function. */
#cmakedefine HAVE_SETRESGID 1
/* Define to 1 if you have the `setresuid' function. */
#cmakedefine HAVE_SETRESUID 1
/* Define to 1 if you have the <stdarg.h> header file. */
#cmakedefine HAVE_STDARG_H 1
@ -273,6 +276,9 @@
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1
/* Define if st_flags field exists in struct stat */
#cmakedefine HAVE_ST_FLAGS 1
/* Define to 1 if you have the `sysconf' function. */
#cmakedefine HAVE_SYSCONF 1
@ -321,10 +327,6 @@
/* HTML viewer, e.g. mozilla */
#cmakedefine HTML_VIEWER
/* Define if <inttypes.h> defines PRI[doxu]64 macros */
/* Note: always defines PRI[doxu]64 macros so inttypes.h becomes useless.*/
#cmakedefine INTTYPES_H_DEFINES_FORMATS 1
/* Define if inet/v6defs.h needs to be included */
#cmakedefine NEED_INET_V6DEFS_H 1
@ -358,9 +360,8 @@
/* Define if we are using version of of the Portaudio library API */
#cmakedefine PORTAUDIO_API_1 1
/* Define to 1 if you have the ANSI C header files. */
/* Note: not use in the code */
#cmakedefine STDC_HEADERS 1
/* Define if we have QtMacExtras */
#cmakedefine QT_MACEXTRAS_LIB 1
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */