mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-06 16:08:43 +02:00
Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>.
2001-02-21 Tor Lillqvist <tml@iki.fi> Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>. Hopefully I got it all in while simultaneously adding support for auto*/libtool for mingw. * Makefile.am: Changes for auto* support on Cygwin and Win32. Do still distribute the hand-written makefiles and *.win32.in files, though. Use GIO, GSPAWN and PLATFORMDEP macros set by configure. Use -no-undefined. Pass -export-symbols glib.def to libtool. * configure.in: Define G_PLATFORM_WIN32 on both pure Win32 (mingw) and Cygwin. Add AC_CYGWIN, AC_EXEEXT and AC_LIBTOOL_WIN32_DLL calls for Cygwin and mingw support. Check for %I64u guint64 format (in MS C library). Set G_MODULE_IMPL on mingw and Cygwin. Use ac_object and ac_exeext. Set GIO, GSPAWN, PLATFORMDEP and G_LIBS_EXTRA. Compile timeloop only on Unix. Define OS_WIN32 automake conditional on Win32. * glib.h: Include gwin32.h also on Cygwin. * gfileutils.c (get_contents_posix): Use O_BINARY (defined as 0 on Unix) for Cygwin's sake. * gtimer.c (GETTIME): Reduce #ifdefs, use a macro GETTIME(). * gconvert.c * gthread.c * gutf8.c * gutils.c: For code needed both on Cygwin and native Win32, test for G_PLATFORM_WIN32. * gtypes.h: Refine GLIB_VAR definition. Also check for DLL_EXPORT in case compiling a static library on Win32 or Cygwin. * gwin32.c: No <direct.h> on Cygwin. No need for ftruncate() or dirent emulation on Cygwin. (get_package_directory_from_module) Convert return value from GetModuleFileName() to POSIX path on Cygwin. * tests/Makefile.am (progs_LDADD): Link with libglib, libgthread and libgmodule as appropriate. Use -no-undefined. * gbacktrace.c: Move #ifdefs around a bit on Win32. * gshell.c (unquote_string_inplace): Make static.
This commit is contained in:
committed by
Tor Lillqvist
parent
608608fcde
commit
5c00c34972
40
Makefile.am
40
Makefile.am
@@ -18,11 +18,7 @@ EXTRA_DIST = \
|
||||
glib.def \
|
||||
makefile.msc.in \
|
||||
makefile.mingw.in \
|
||||
giowin32.c \
|
||||
glibconfig.h.win32.in \
|
||||
gwin32.c \
|
||||
gspawn-win32.c \
|
||||
gspawn-win32-helper.c \
|
||||
config.h.win32.in \
|
||||
build-dll \
|
||||
glib.rc.in \
|
||||
@@ -57,7 +53,6 @@ libglib_1_3_la_SOURCES = \
|
||||
ghash.c \
|
||||
ghook.c \
|
||||
giochannel.c \
|
||||
giounix.c \
|
||||
glibintl.h \
|
||||
glist.c \
|
||||
gmain.c \
|
||||
@@ -73,7 +68,6 @@ libglib_1_3_la_SOURCES = \
|
||||
gscanner.c \
|
||||
gshell.c \
|
||||
gslist.c \
|
||||
gspawn.c \
|
||||
gstrfuncs.c \
|
||||
gstring.c \
|
||||
gthread.c \
|
||||
@@ -89,8 +83,12 @@ libglib_1_3_la_SOURCES = \
|
||||
gunidecomp.c \
|
||||
gutils.c
|
||||
|
||||
## If we decide to link in 'alloca.c', this is how to do it
|
||||
#libglib_1_3_la_LIBADD = @ALLOCA@
|
||||
EXTRA_libglib_1_3_la_SOURCES = \
|
||||
giounix.c \
|
||||
giowin32.c \
|
||||
gspawn.c \
|
||||
gspawn-win32.c \
|
||||
gwin32.c
|
||||
|
||||
glibincludedir=$(includedir)/glib-2.0
|
||||
glibinclude_HEADERS = \
|
||||
@@ -158,18 +156,36 @@ stamp-gc-h: config.status
|
||||
CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=glibconfig.h ./config.status
|
||||
echo timestamp > stamp-gc-h
|
||||
|
||||
libglib_1_3_la_LIBADD = @ICONV_LIBS@
|
||||
libglib_1_3_la_LIBADD = @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@
|
||||
libglib_1_3_la_DEPENDENCIES = @GIO@ @GSPAWN@ @PLATFORMDEP@
|
||||
|
||||
|
||||
if PLATFORM_WIN32
|
||||
no_undefined = -no-undefined
|
||||
endif
|
||||
if OS_WIN32
|
||||
# This requires a very new libtool
|
||||
export_symbols = -export-symbols glib.def
|
||||
endif
|
||||
|
||||
libglib_1_3_la_LDFLAGS = \
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
|
||||
-export-dynamic
|
||||
-export-dynamic $(no_undefined) $(export_symbols)
|
||||
|
||||
noinst_PROGRAMS = testglib testgdate testgdateparser timeloop
|
||||
if OS_WIN32
|
||||
bin_PROGRAMS = gspawn-win32-helper
|
||||
gspawn_win32_helper_LDADD = libglib-1.3.la
|
||||
endif
|
||||
if ENABLE_TIMELOOP
|
||||
timeloop = timeloop
|
||||
endif
|
||||
noinst_PROGRAMS = testglib testgdate testgdateparser $(timeloop)
|
||||
testglib_LDADD = libglib-1.3.la
|
||||
testgdate_LDADD = libglib-1.3.la
|
||||
testgdateparser_LDADD = libglib-1.3.la
|
||||
if ENABLE_TIMELOOP
|
||||
timeloop_LDADD = libglib-1.3.la
|
||||
|
||||
endif
|
||||
m4datadir = $(datadir)/aclocal
|
||||
m4data_DATA = glib-2.0.m4
|
||||
|
||||
|
Reference in New Issue
Block a user