mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-10-26 12:25:09 +03:00
build: Don't check for pthread.h
The Autotools build still checks for pthread.h (and zlib.h and lzma.h) but the result isn't needed in config.h.
This commit is contained in:
parent
cc03c069f5
commit
e1291059af
@ -293,12 +293,6 @@ add_library(LibXml2::LibXml2 ALIAS LibXml2)
|
|||||||
|
|
||||||
target_compile_definitions(LibXml2 PRIVATE SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}")
|
target_compile_definitions(LibXml2 PRIVATE SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}")
|
||||||
|
|
||||||
if(LIBXML2_WITH_THREADS)
|
|
||||||
if(NOT WIN32)
|
|
||||||
check_include_files(pthread.h HAVE_PTHREAD_H)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
LibXml2
|
LibXml2
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
@ -21,9 +21,6 @@
|
|||||||
/* Define to 1 if you have the <poll.h> header file. */
|
/* Define to 1 if you have the <poll.h> header file. */
|
||||||
#cmakedefine HAVE_POLL_H 1
|
#cmakedefine HAVE_POLL_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <pthread.h> header file. */
|
|
||||||
#cmakedefine HAVE_PTHREAD_H 1
|
|
||||||
|
|
||||||
/* Have shl_load based dso */
|
/* Have shl_load based dso */
|
||||||
#cmakedefine HAVE_SHLLOAD 1
|
#cmakedefine HAVE_SHLLOAD 1
|
||||||
|
|
||||||
|
@ -711,9 +711,7 @@ else
|
|||||||
WITH_THREADS="1"
|
WITH_THREADS="1"
|
||||||
if test "$ac_cv_search_pthread_create" != "none required"; then
|
if test "$ac_cv_search_pthread_create" != "none required"; then
|
||||||
THREAD_LIBS=$ac_cv_search_pthread_create
|
THREAD_LIBS=$ac_cv_search_pthread_create
|
||||||
fi
|
fi]))
|
||||||
AC_DEFINE([HAVE_PTHREAD_H], [],
|
|
||||||
[Define if <pthread.h> is there])]))
|
|
||||||
LIBS=$_libs
|
LIBS=$_libs
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -310,7 +310,6 @@ endif
|
|||||||
### threads
|
### threads
|
||||||
if want_threads
|
if want_threads
|
||||||
threads_dep = dependency('threads')
|
threads_dep = dependency('threads')
|
||||||
config_h.set10(sys_windows ? 'HAVE_WIN32_THREADS' : 'HAVE_PTHREAD_H', true)
|
|
||||||
xml_deps += threads_dep
|
xml_deps += threads_dep
|
||||||
else
|
else
|
||||||
threads_dep = dependency('', required: false)
|
threads_dep = dependency('', required: false)
|
||||||
|
11
runtest.c
11
runtest.c
@ -4420,7 +4420,7 @@ testThread(void)
|
|||||||
return (res);
|
return (res);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined HAVE_PTHREAD_H
|
#else
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
static pthread_t tid[MAX_ARGC];
|
static pthread_t tid[MAX_ARGC];
|
||||||
@ -4469,15 +4469,6 @@ testThread(void)
|
|||||||
}
|
}
|
||||||
return (res);
|
return (res);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
static int
|
|
||||||
testThread(void)
|
|
||||||
{
|
|
||||||
fprintf(stderr,
|
|
||||||
"Specific platform thread support not detected\n");
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
static int
|
static int
|
||||||
threadsTest(const char *filename ATTRIBUTE_UNUSED,
|
threadsTest(const char *filename ATTRIBUTE_UNUSED,
|
||||||
|
@ -59,8 +59,6 @@ CFLAGS = $(CFLAGS) -tWR
|
|||||||
!endif
|
!endif
|
||||||
!if "$(WITH_THREADS)" == "ctls"
|
!if "$(WITH_THREADS)" == "ctls"
|
||||||
CFLAGS = $(CFLAGS) "-DXML_THREAD_LOCAL=__declspec(thread)"
|
CFLAGS = $(CFLAGS) "-DXML_THREAD_LOCAL=__declspec(thread)"
|
||||||
!else if "$(WITH_THREADS)" == "posix"
|
|
||||||
CFLAGS = $(CFLAGS) -DHAVE_PTHREAD_H
|
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
# The linker and its options.
|
# The linker and its options.
|
||||||
|
@ -42,9 +42,6 @@ CFLAGS += -I$(XML_SRCDIR) -I$(XML_SRCDIR)/include -I$(INCPREFIX) $(INCLUDE)
|
|||||||
ifeq ($(WITH_THREADS),ctls)
|
ifeq ($(WITH_THREADS),ctls)
|
||||||
CFLAGS += "-DXML_THREAD_LOCAL=__declspec(thread)"
|
CFLAGS += "-DXML_THREAD_LOCAL=__declspec(thread)"
|
||||||
endif
|
endif
|
||||||
ifeq ($(WITH_THREADS),posix)
|
|
||||||
CFLAGS += -DHAVE_PTHREAD_H
|
|
||||||
endif
|
|
||||||
|
|
||||||
# The linker and its options.
|
# The linker and its options.
|
||||||
LD = gcc.exe
|
LD = gcc.exe
|
||||||
|
@ -44,8 +44,6 @@ CFLAGS = /nologo /D "_WINDOWS" /D "_MBCS" /D "NOLIBTOOL" /W3 /wd4244 /wd4267 $(C
|
|||||||
CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX)
|
CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX)
|
||||||
!if "$(WITH_THREADS)" == "ctls"
|
!if "$(WITH_THREADS)" == "ctls"
|
||||||
CFLAGS = $(CFLAGS) /D "XML_THREAD_LOCAL=__declspec(thread)"
|
CFLAGS = $(CFLAGS) /D "XML_THREAD_LOCAL=__declspec(thread)"
|
||||||
!else if "$(WITH_THREADS)" == "posix"
|
|
||||||
CFLAGS = $(CFLAGS) /D "HAVE_PTHREAD_H"
|
|
||||||
!endif
|
!endif
|
||||||
CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
|
CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user