Loading configure.ac +30 −29 Original line number Diff line number Diff line Loading @@ -211,32 +211,37 @@ AM_CONDITIONAL([CURL_LT_SHLIB_USE_NO_UNDEFINED], AM_CONDITIONAL([CURL_LT_SHLIB_USE_MIMPURE_TEXT], [test "x$xc_lt_shlib_use_mimpure_text" = 'xyes']) # # Due to libtool and automake machinery limitations of not allowing # specifying separate CPPFLAGS or CFLAGS when compiling objects for # inclusion of these in shared or static libraries, we are forced to # build using separate configure runs for shared and static libraries # on systems where different CPPFLAGS or CFLAGS are mandatory in order # to compile objects for each kind of library. Notice that relying on # the '-DPIC' CFLAG that libtool provides is not valid given that the # user might for example choose to build static libraries with PIC. # AC_MSG_CHECKING([if we need BUILDING_LIBCURL]) use_cppflag_building_libcurl="no" use_cppflag_curl_staticlib="no" CPPFLAG_CURL_STATICLIB="" case $host in *-*-mingw*) AC_MSG_RESULT(yes) use_cppflag_building_libcurl="yes" AC_MSG_CHECKING([if we need CURL_STATICLIB]) if test "X$enable_shared" = "Xno" then AC_MSG_RESULT(yes) use_cppflag_curl_staticlib="yes" CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB" else AC_MSG_RESULT(no) # # Make our Makefile.am files use the staticlib CPPFLAG only when strictly # targeting a static library and not building its shared counterpart. # AM_CONDITIONAL([USE_CPPFLAG_CURL_STATICLIB], [test "x$xc_lt_build_static_only" = 'xyes']) # # Make staticlib CPPFLAG variable and its definition visible in output # files unconditionally, providing an empty definition unless strictly # targeting a static library and not building its shared counterpart. # CPPFLAG_CURL_STATICLIB= if test "x$xc_lt_build_static_only" = 'xyes'; then CPPFLAG_CURL_STATICLIB='-DCURL_STATICLIB' fi ;; *) AC_MSG_RESULT(no) ;; esac AM_CONDITIONAL(USE_CPPFLAG_BUILDING_LIBCURL, test x$use_cppflag_building_libcurl = xyes) AM_CONDITIONAL(USE_CPPFLAG_CURL_STATICLIB, test x$use_cppflag_curl_staticlib = xyes) AC_SUBST(CPPFLAG_CURL_STATICLIB) AC_SUBST([CPPFLAG_CURL_STATICLIB]) # Determine whether all dependent libraries must be specified when linking if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno" Loading @@ -248,10 +253,6 @@ fi AC_SUBST(REQUIRE_LIB_DEPS) AM_CONDITIONAL(USE_EXPLICIT_LIB_DEPS, test x$REQUIRE_LIB_DEPS = xyes) dnl The install stuff has already been taken care of by the automake stuff dnl AC_PROG_INSTALL AC_PROG_MAKE_SET dnl check if there's a way to force code inline AC_C_INLINE Loading docs/examples/Makefile.am +0 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ LIBDIR = $(top_builddir)/lib # Avoid libcurl obsolete stuff AM_CPPFLAGS += -DCURL_NO_OLDIES # Mostly for Windows build targets, when using static libcurl if USE_CPPFLAG_CURL_STATICLIB AM_CPPFLAGS += -DCURL_STATICLIB endif Loading include/curl/curl.h +13 −21 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -93,30 +93,22 @@ extern "C" { typedef void CURL; /* * Decorate exportable functions for Win32 and Symbian OS DLL linking. * This avoids using a .def file for building libcurl.dll. * libcurl external API function linkage decorations. */ #if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && \ !defined(CURL_STATICLIB) #ifdef CURL_STATICLIB # define CURL_EXTERN #elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__) # if defined(BUILDING_LIBCURL) # define CURL_EXTERN __declspec(dllexport) # else # define CURL_EXTERN __declspec(dllimport) # endif #else #ifdef CURL_HIDDEN_SYMBOLS /* * This definition is used to make external definitions visible in the * shared library when symbols are hidden by default. It makes no * difference when compiling applications whether this is set or not, * only when compiling the library. */ #elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS) # define CURL_EXTERN CURL_EXTERN_SYMBOL #else # define CURL_EXTERN #endif #endif #ifndef curl_socket_typedef /* socket typedef */ Loading lib/Makefile.am +20 −27 Original line number Diff line number Diff line Loading @@ -37,13 +37,16 @@ EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 config-win32.h \ objnames-test08.sh objnames-test10.sh objnames.inc lib_LTLIBRARIES = libcurl.la LIBCURL_LIBS = @LIBCURL_LIBS@ if BUILD_UNITTESTS noinst_LTLIBRARIES = libcurlu.la else noinst_LTLIBRARIES = endif # This might hold -Werror CFLAGS += @CURL_CFLAG_EXTRAS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ # Specify our include paths here, and do it relative to $(top_srcdir) and # $(top_builddir), to ensure that these paths which belong to the library # being currently built and tested are searched before the library which Loading Loading @@ -76,16 +79,6 @@ endif # Prevent LIBS from being used for all link targets LIBS = $(BLANK_AT_MAKETIME) # Mostly for Windows build targets, when building libcurl library if USE_CPPFLAG_BUILDING_LIBCURL AM_CPPFLAGS += -DBUILDING_LIBCURL endif # Mostly for Windows build targets, when building static libcurl if USE_CPPFLAG_CURL_STATICLIB AM_CPPFLAGS += -DCURL_STATICLIB endif if SONAME_BUMP # # Bumping of SONAME conditionally may seem like a weird thing to do, and yeah Loading Loading @@ -114,9 +107,13 @@ endif # # For the full guide on libcurl ABI rules, see docs/libcurl/ABI AM_CPPFLAGS += -DBUILDING_LIBCURL AM_LDFLAGS = AM_CFLAGS = libcurl_la_CPPFLAGS_EXTRA = libcurl_la_LDFLAGS_EXTRA = libcurl_la_CFLAGS_EXTRA = if CURL_LT_SHLIB_USE_VERSION_INFO libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO) Loading @@ -134,25 +131,21 @@ if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers endif libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LIBCURL_LIBS) if USE_CPPFLAG_CURL_STATICLIB libcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB endif if DOING_CURL_SYMBOL_HIDING libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_HIDDEN_SYMBOLS libcurl_la_CFLAGS = $(AM_CFLAGS) $(CFLAG_CURL_SYMBOL_HIDING) else libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) libcurl_la_CFLAGS = $(AM_CFLAGS) libcurl_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS libcurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING) endif # unit testing static library built only along with unit tests if BUILD_UNITTESTS noinst_LTLIBRARIES = libcurlu.la else noinst_LTLIBRARIES = endif libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA) libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LIBCURL_LIBS) libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA) libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DUNITTESTS libcurlu_la_LDFLAGS = -static $(LIBCURL_LIBS) libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_LIBS) libcurlu_la_CFLAGS = $(AM_CFLAGS) # Makefile.inc provides the CSOURCES and HHEADERS defines Loading src/Makefile.am +0 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ AM_CPPFLAGS = -I$(top_builddir)/include/curl \ bin_PROGRAMS = curl # Mostly for Windows build targets, when using static libcurl if USE_CPPFLAG_CURL_STATICLIB AM_CPPFLAGS += -DCURL_STATICLIB endif Loading Loading
configure.ac +30 −29 Original line number Diff line number Diff line Loading @@ -211,32 +211,37 @@ AM_CONDITIONAL([CURL_LT_SHLIB_USE_NO_UNDEFINED], AM_CONDITIONAL([CURL_LT_SHLIB_USE_MIMPURE_TEXT], [test "x$xc_lt_shlib_use_mimpure_text" = 'xyes']) # # Due to libtool and automake machinery limitations of not allowing # specifying separate CPPFLAGS or CFLAGS when compiling objects for # inclusion of these in shared or static libraries, we are forced to # build using separate configure runs for shared and static libraries # on systems where different CPPFLAGS or CFLAGS are mandatory in order # to compile objects for each kind of library. Notice that relying on # the '-DPIC' CFLAG that libtool provides is not valid given that the # user might for example choose to build static libraries with PIC. # AC_MSG_CHECKING([if we need BUILDING_LIBCURL]) use_cppflag_building_libcurl="no" use_cppflag_curl_staticlib="no" CPPFLAG_CURL_STATICLIB="" case $host in *-*-mingw*) AC_MSG_RESULT(yes) use_cppflag_building_libcurl="yes" AC_MSG_CHECKING([if we need CURL_STATICLIB]) if test "X$enable_shared" = "Xno" then AC_MSG_RESULT(yes) use_cppflag_curl_staticlib="yes" CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB" else AC_MSG_RESULT(no) # # Make our Makefile.am files use the staticlib CPPFLAG only when strictly # targeting a static library and not building its shared counterpart. # AM_CONDITIONAL([USE_CPPFLAG_CURL_STATICLIB], [test "x$xc_lt_build_static_only" = 'xyes']) # # Make staticlib CPPFLAG variable and its definition visible in output # files unconditionally, providing an empty definition unless strictly # targeting a static library and not building its shared counterpart. # CPPFLAG_CURL_STATICLIB= if test "x$xc_lt_build_static_only" = 'xyes'; then CPPFLAG_CURL_STATICLIB='-DCURL_STATICLIB' fi ;; *) AC_MSG_RESULT(no) ;; esac AM_CONDITIONAL(USE_CPPFLAG_BUILDING_LIBCURL, test x$use_cppflag_building_libcurl = xyes) AM_CONDITIONAL(USE_CPPFLAG_CURL_STATICLIB, test x$use_cppflag_curl_staticlib = xyes) AC_SUBST(CPPFLAG_CURL_STATICLIB) AC_SUBST([CPPFLAG_CURL_STATICLIB]) # Determine whether all dependent libraries must be specified when linking if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno" Loading @@ -248,10 +253,6 @@ fi AC_SUBST(REQUIRE_LIB_DEPS) AM_CONDITIONAL(USE_EXPLICIT_LIB_DEPS, test x$REQUIRE_LIB_DEPS = xyes) dnl The install stuff has already been taken care of by the automake stuff dnl AC_PROG_INSTALL AC_PROG_MAKE_SET dnl check if there's a way to force code inline AC_C_INLINE Loading
docs/examples/Makefile.am +0 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ LIBDIR = $(top_builddir)/lib # Avoid libcurl obsolete stuff AM_CPPFLAGS += -DCURL_NO_OLDIES # Mostly for Windows build targets, when using static libcurl if USE_CPPFLAG_CURL_STATICLIB AM_CPPFLAGS += -DCURL_STATICLIB endif Loading
include/curl/curl.h +13 −21 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -93,30 +93,22 @@ extern "C" { typedef void CURL; /* * Decorate exportable functions for Win32 and Symbian OS DLL linking. * This avoids using a .def file for building libcurl.dll. * libcurl external API function linkage decorations. */ #if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && \ !defined(CURL_STATICLIB) #ifdef CURL_STATICLIB # define CURL_EXTERN #elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__) # if defined(BUILDING_LIBCURL) # define CURL_EXTERN __declspec(dllexport) # else # define CURL_EXTERN __declspec(dllimport) # endif #else #ifdef CURL_HIDDEN_SYMBOLS /* * This definition is used to make external definitions visible in the * shared library when symbols are hidden by default. It makes no * difference when compiling applications whether this is set or not, * only when compiling the library. */ #elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS) # define CURL_EXTERN CURL_EXTERN_SYMBOL #else # define CURL_EXTERN #endif #endif #ifndef curl_socket_typedef /* socket typedef */ Loading
lib/Makefile.am +20 −27 Original line number Diff line number Diff line Loading @@ -37,13 +37,16 @@ EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 config-win32.h \ objnames-test08.sh objnames-test10.sh objnames.inc lib_LTLIBRARIES = libcurl.la LIBCURL_LIBS = @LIBCURL_LIBS@ if BUILD_UNITTESTS noinst_LTLIBRARIES = libcurlu.la else noinst_LTLIBRARIES = endif # This might hold -Werror CFLAGS += @CURL_CFLAG_EXTRAS@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ # Specify our include paths here, and do it relative to $(top_srcdir) and # $(top_builddir), to ensure that these paths which belong to the library # being currently built and tested are searched before the library which Loading Loading @@ -76,16 +79,6 @@ endif # Prevent LIBS from being used for all link targets LIBS = $(BLANK_AT_MAKETIME) # Mostly for Windows build targets, when building libcurl library if USE_CPPFLAG_BUILDING_LIBCURL AM_CPPFLAGS += -DBUILDING_LIBCURL endif # Mostly for Windows build targets, when building static libcurl if USE_CPPFLAG_CURL_STATICLIB AM_CPPFLAGS += -DCURL_STATICLIB endif if SONAME_BUMP # # Bumping of SONAME conditionally may seem like a weird thing to do, and yeah Loading Loading @@ -114,9 +107,13 @@ endif # # For the full guide on libcurl ABI rules, see docs/libcurl/ABI AM_CPPFLAGS += -DBUILDING_LIBCURL AM_LDFLAGS = AM_CFLAGS = libcurl_la_CPPFLAGS_EXTRA = libcurl_la_LDFLAGS_EXTRA = libcurl_la_CFLAGS_EXTRA = if CURL_LT_SHLIB_USE_VERSION_INFO libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO) Loading @@ -134,25 +131,21 @@ if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers endif libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LIBCURL_LIBS) if USE_CPPFLAG_CURL_STATICLIB libcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB endif if DOING_CURL_SYMBOL_HIDING libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_HIDDEN_SYMBOLS libcurl_la_CFLAGS = $(AM_CFLAGS) $(CFLAG_CURL_SYMBOL_HIDING) else libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) libcurl_la_CFLAGS = $(AM_CFLAGS) libcurl_la_CPPFLAGS_EXTRA += -DCURL_HIDDEN_SYMBOLS libcurl_la_CFLAGS_EXTRA += $(CFLAG_CURL_SYMBOL_HIDING) endif # unit testing static library built only along with unit tests if BUILD_UNITTESTS noinst_LTLIBRARIES = libcurlu.la else noinst_LTLIBRARIES = endif libcurl_la_CPPFLAGS = $(AM_CPPFLAGS) $(libcurl_la_CPPFLAGS_EXTRA) libcurl_la_LDFLAGS = $(AM_LDFLAGS) $(libcurl_la_LDFLAGS_EXTRA) $(LIBCURL_LIBS) libcurl_la_CFLAGS = $(AM_CFLAGS) $(libcurl_la_CFLAGS_EXTRA) libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DUNITTESTS libcurlu_la_LDFLAGS = -static $(LIBCURL_LIBS) libcurlu_la_CPPFLAGS = $(AM_CPPFLAGS) -DCURL_STATICLIB -DUNITTESTS libcurlu_la_LDFLAGS = $(AM_LDFLAGS) -static $(LIBCURL_LIBS) libcurlu_la_CFLAGS = $(AM_CFLAGS) # Makefile.inc provides the CSOURCES and HHEADERS defines Loading
src/Makefile.am +0 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ AM_CPPFLAGS = -I$(top_builddir)/include/curl \ bin_PROGRAMS = curl # Mostly for Windows build targets, when using static libcurl if USE_CPPFLAG_CURL_STATICLIB AM_CPPFLAGS += -DCURL_STATICLIB endif Loading