AM_CONDITIONAL([WANT_SYSTEMD], [test "${want_systemd}" = "yes"])
AM_CONDITIONAL([HAVE_SYSTEMD], [test "${want_systemd}" = "yes" -a "${have_systemd_pkg}" = "yes"])
#### Platform-dependent
-DL_LIBS=""
-DL_INTERNAL_LIBS=""
#### Evil
EFL_LIB_START_OPTIONAL([Evil], [test "${have_windows}" = "yes"])
### Checks for libraries
-EFL_ADD_LIBS([EVIL], [-lole32 -lws2_32 -lsecur32 -luuid])
-EVIL_DLFCN_LIBS="-lpsapi"
-
-AC_SUBST([EVIL_DLFCN_LIBS])
+EFL_ADD_LIBS([EVIL], [-lpsapi -lole32 -lws2_32 -lsecur32 -luuid])
### Checks for header files
### Checks for compiler characteristics
-EVIL_DLFCN_CPPFLAGS="-DEFL_EVIL_DLFCN_BUILD -DPSAPI_VERSION=1"
+EVIL_CPPFLAGS="-DPSAPI_VERSION=1"
# TODO: should we have these at EFL (global?)
# Note: these warnings should not be used with C++ code
EVIL_CFLAGS_WRN="-Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
EVIL_CXXFLAGS="-fno-rtti -fno-exceptions -DSECURITY_WIN32 ${EVIL_CXXFLAGS}"
fi
-AC_SUBST([EVIL_DLFCN_CPPFLAGS])
+AC_SUBST([EVIL_CPPFLAGS])
AC_SUBST([EVIL_CFLAGS_WRN])
AC_SUBST([EVIL_CXXFLAGS])
### Checks for library functions
-DL_LIBS="lib/evil/libdl.la"
-DL_INTERNAL_LIBS="lib/evil/libdl.la"
-
EFL_LIB_END_OPTIONAL([Evil])
AC_SUBST([USE_EVIL_CFLAGS])
case "$host_os" in
mingw*)
$2="yes"
- EFL_ADD_LIBS([$1], [lib/evil/libdl.la])
+ EFL_ADD_LIBS([$1], [lib/evil/libevil.la])
;;
*)
EFL_FIND_LIB_FOR_CODE([$1], [$dllibs], [$2], [[
case "$host_os" in
mingw*)
$2="yes"
- EFL_ADD_LIBS([$1], [lib/evil/libdl.la])
+ EFL_ADD_LIBS([$1], [lib/evil/libevil.la])
;;
*)
EFL_FIND_LIB_FOR_CODE([$1], [$dllibs], [$2], [[
case "$host_os" in
mingw*)
$2="yes"
- EFL_ADD_LIBS([$1], [lib/evil/libdl.la])
+ EFL_ADD_LIBS([$1], [lib/evil/libevil.la])
;;
*)
EFL_FIND_LIB_FOR_CODE([$1], [$dllibs], [$2], [[
@VALGRIND_CFLAGS@ \
@SSE3_CFLAGS@
-lib_ector_libector_la_LIBADD = @ECTOR_LIBS@ @DL_LIBS@
-lib_ector_libector_la_DEPENDENCIES = @ECTOR_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
+lib_ector_libector_la_LIBADD = @ECTOR_LIBS@
+lib_ector_libector_la_DEPENDENCIES = @ECTOR_INTERNAL_LIBS@
lib_ector_libector_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
### Unit tests
-DPACKAGE_DATA_DIR=\"$(datadir)/eina\" \
@VALGRIND_CFLAGS@
-lib_eina_libeina_la_LIBADD = @EINA_LIBS@ @DL_LIBS@ @UNWIND_LIBS@
-lib_eina_libeina_la_DEPENDENCIES = @EINA_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
+lib_eina_libeina_la_LIBADD = @EINA_LIBS@ @UNWIND_LIBS@
+lib_eina_libeina_la_DEPENDENCIES = @EINA_INTERNAL_LIBS@
lib_eina_libeina_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
### Binaries
if HAVE_WINDOWS
### Library
-lib_LTLIBRARIES += lib/evil/libevil.la lib/evil/libdl.la
+lib_LTLIBRARIES += lib/evil/libevil.la
install_evilheadersdir = $(includedir)/evil-@VMAJ@
dist_install_evilheaders_DATA = \
lib/evil/Evil.h \
+lib/evil/evil_dlfcn.h \
lib/evil/evil_fcntl.h \
lib/evil/evil_inet.h \
lib/evil/evil_langinfo.h \
lib/evil/evil_unistd.h \
lib/evil/evil_util.h \
lib/evil/dirent.h \
-lib/evil/dlfcn.h \
lib/evil/fnmatch.h \
lib/evil/pwd.h
lib_evil_libevil_la_SOURCES = \
lib/evil/evil_dirent.c \
+lib/evil/evil_dlfcn.c \
lib/evil/evil_fcntl.c \
lib/evil/evil_fnmatch.c \
lib/evil/evil_fnmatch_list_of_states.c \
lib/evil/evil_private.h \
lib/evil/evil_fnmatch_private.h
+lib_evil_libevil_la_CPPFLAGS = @EVIL_CPPFLAGS@
lib_evil_libevil_la_CFLAGS = @EVIL_CFLAGS@ @EVIL_CFLAGS_WRN@ -D__USE_MINGW_ANSI_STDIO
lib_evil_libevil_la_CXXFLAGS = @EVIL_CXXFLAGS@ @EVIL_CFLAGS@
lib_evil_libevil_la_LIBADD = @EVIL_LIBS@
lib/evil/regex/regex2.h \
lib/evil/regex/utils.h
-lib_evil_libevil_la_CPPFLAGS = \
+lib_evil_libevil_la_CPPFLAGS += \
-I$(top_srcdir)/src/lib/evil \
-I$(top_srcdir)/src/lib/evil/regex \
-DPOSIX_MISTAKE
-#libdl
-
-lib_evil_libdl_la_SOURCES = lib/evil/dlfcn.c
-
-lib_evil_libdl_la_CPPFLAGS = \
--I$(top_builddir)/src/lib/efl \
-@EVIL_CFLAGS@ \
-@EVIL_DLFCN_CPPFLAGS@
-lib_evil_libdl_la_LIBADD = @USE_EVIL_LIBS@ @EVIL_DLFCN_LIBS@
-lib_evil_libdl_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
-lib_evil_libdl_la_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@
-
### Binary
bin_PROGRAMS += bin/evil/evil_suite bin/evil/test_evil
#suite_SOURCES += bin/evil/memcpy_glibc_i686.S # see EXTRA_DIST below!
bin_evil_evil_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EVIL_CFLAGS@
-bin_evil_evil_suite_LDADD = @USE_EVIL_LIBS@ @DL_LIBS@ -lm
-bin_evil_evil_suite_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
+bin_evil_evil_suite_LDADD = @USE_EVIL_LIBS@ -lm
+bin_evil_evil_suite_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@
bin_evil_test_evil_SOURCES = bin/evil/test_evil.c
bin_evil_test_evil_LDADD = @USE_EVIL_LIBS@
-bin_evil_test_evil_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
+bin_evil_test_evil_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@
### Unit tests
-DTESTS_BUILD_DIR=PACKAGE_BUILD_DIR \
@CHECK_CFLAGS@ \
@EVIL_CFLAGS@
-tests_evil_evil_suite_LDADD = @USE_EVIL_LIBS@ @DL_LIBS@ @CHECK_LIBS@
-tests_evil_evil_suite_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
+tests_evil_evil_suite_LDADD = @USE_EVIL_LIBS@ @CHECK_LIBS@
+tests_evil_evil_suite_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@
endif
#endif /* HAVE_CONFIG_H */
#include <string.h>
-#include <dlfcn.h>
#include <Evil.h>
#error No uv.h header found?
#endif
-#include <dlfcn.h>
+#if defined HAVE_DLOPEN && ! defined _WIN32
+# include <dlfcn.h>
+#endif
static uv_prepare_t _ecore_main_uv_prepare;
static uv_check_t _ecore_main_uv_check;
#include <libgen.h>
#include <unistd.h>
-#ifdef HAVE_DLOPEN
+#if defined HAVE_DLOPEN && ! defined _WIN32
# include <dlfcn.h>
#endif
#include <unistd.h>
#include <limits.h>
-#ifdef HAVE_DLADDR
+#if defined HAVE_DLADDR && ! defined _WIN32
# include <dlfcn.h>
#endif
# include <config.h>
#endif
-#ifdef HAVE_DLADDR
+#if defined HAVE_DLADDR && ! defined _WIN32
# include <dlfcn.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
-#include <dlfcn.h>
#include <ctype.h>
#include <pwd.h>
#include "evil_macro.h"
+#include "evil_dlfcn.h"
#include "evil_fcntl.h"
#include "evil_inet.h"
#include "evil_langinfo.h"
#include "evil_macro.h"
#include "evil_util.h"
+#include "evil_dlfcn.h"
#include "evil_private.h"
-#include "dlfcn.h"
-
static char *_dl_err = NULL;
static int _dl_err_viewed = 0;
#include <limits.h>
-#ifdef EAPI
-# undef EAPI
-#endif /* EAPI */
-
-#ifdef _WIN32
-# ifdef EFL_EVIL_DLFCN_BUILD
-# ifdef DLL_EXPORT
-# define EAPI __declspec(dllexport)
-# else
-# define EAPI
-# endif /* ! DLL_EXPORT */
-# else
-# define EAPI __declspec(dllimport)
-# endif /* ! EFL_EVIL_DLFCN_BUILD */
-#endif /* _WIN32 */
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
/**
- * @file dlfcn.h
+ * @file evil_dlfcn.h
* @brief The file that provides functions to manage dynamic-link libraries
* @defgroup Evil_Dlfcn Functions that manage dynamic-link libraries.
* @ingroup Evil
*
* @ingroup Evil_Dlfcn
*/
-EAPI int dlclose(void* handle);
+EAPI int dlclose(void* handle);
/**
* @brief Get the address of a symbol.
EAPI char *dlerror (void);
-#ifdef __cplusplus
-}
-#endif
-
-
#endif /* __EVIL_DLFCN_H__ */
*
* This header provides functions ported from Unix in stdio.h.
*
- *
*/
#define EVIL_PATH_SEP_SWAP(p, s1, s2) \
#define GL_ERRORS_NODEF 1
#include "evas_gl_core_private.h"
#include "evas_gl_api_ext.h"
-#include <dlfcn.h>
+
+#ifndef _WIN32
+# include <dlfcn.h>
+#endif
#define EVGL_FUNC_BEGIN() if (UNLIKELY(_need_context_restore)) _context_restore()
#include "evas_gl_api_ext.h"
-#include <dlfcn.h>
+#ifndef _WIN32
+# include <dlfcn.h>
+#endif
#define EVGL_FUNC_BEGIN() if (UNLIKELY(_need_context_restore)) _context_restore()
#define GL_ERRORS_NODEF 1
#include "evas_gl_core_private.h"
-#include <dlfcn.h>
+#ifndef _WIN32
+# include <dlfcn.h>
+#endif
#define EVGL_FUNC_BEGIN() if (UNLIKELY(_need_context_restore)) _context_restore()
//#define GL_ERRORS_TRACE 1
#ifdef GL_ERRORS
-#include <dlfcn.h>
+
+# ifndef _WIN32
+# include <dlfcn.h>
+# endif
+
static inline void
__evas_gl_errdyn(int err, const char *file, const char *func, int line, const char *op)
{
#define _EVAS_GL_CONTEXT_C
#include "evas_gl_private.h"
-#ifdef HAVE_DLSYM
+#if defined HAVE_DLSYM && ! defined _WIN32
# include <dlfcn.h> /* dlopen,dlclose,etc */
#else
# error gl_common should not get compiled if dlsym is not found on the system!
#include "evas_gl_core_private.h"
-#include <dlfcn.h>
+
+#ifndef _WIN32
+# include <dlfcn.h>
+#endif
// EVGL GL Format Pair
typedef struct _GL_Format
#include "software/Ector_Software.h"
#include "cairo/Ector_Cairo.h"
-#ifdef HAVE_DLSYM
+#if defined HAVE_DLSYM && ! defined _WIN32
# include <dlfcn.h> /* dlopen,dlclose,etc */
#else
# error gl_x11 should not get compiled if dlsym is not found on the system!
#include "evas_private.h"
#include "evas_engine.h"
-#include <dlfcn.h>
+#ifndef _WIN32
+# include <dlfcn.h>
+#endif
#include <SDL2/SDL_opengl.h>
#include <software/Ector_Software.h>
#include "cairo/Ector_Cairo.h"
-#ifdef HAVE_DLSYM
+#if defined HAVE_DLSYM && ! defined _WIN32
# include <dlfcn.h> /* dlopen,dlclose,etc */
+#endif
+#if defined HAVE_DLSYM
# define EVAS_GL 1
# define EVAS_GL_NO_GL_H_CHECK 1
# include "Evas_GL.h"
#endif
#include <stdio.h>
-#include <dlfcn.h>
+
+#ifndef _WIN32
+# include <dlfcn.h>
+#endif
#define EFL_GFX_FILTER_BETA
#include "evas_suite.h"
# include "config.h"
#endif
-#include <dlfcn.h>
#include <Evil.h>
#include "evil_suite.h"