Set MOO_XML2H in configure; check for gettimeofday() in configure, mingw version check isn't enough

This commit is contained in:
Yevgen Muntyan 2008-05-15 17:22:47 -05:00
parent 9c35236dbe
commit df5ec626a9
7 changed files with 20 additions and 9 deletions

View File

@ -23,6 +23,7 @@ AC_DEFUN_ONCE([MOO_AC_FLAGS],[
MOO_AC_PYTHON
dnl must be called after MOO_AC_PYTHON
MOO_AC_LIB
MOO_AC_TOOLS([$1])
MOO_ENABLE_GENERATED_FILES="yes"
AC_ARG_ENABLE(generated-files,
@ -83,6 +84,11 @@ AC_DEFUN_ONCE([MOO_AC_FLAGS],[
MOO_CFLAGS="$MOO_CFLAGS -DWIN32_LEAN_AND_MEAN -DUNICODE"
MOO_WIN32_CFLAGS="-I$moo_top_src_dir/$1/mooutils/moowin32/mingw"
AC_DEFINE(HAVE_MMAP, [1], [using fake mmap on windows])
# gettimeofday is present in recent mingw
AC_CHECK_FUNC(gettimeofday,[:],[
MOO_WIN32_CFLAGS="$MOO_WIN32_CFLAGS -I$moo_top_src_dir/$1/mooutils/moowin32/ms"
])
fi
################################################################################

8
m4/moo-tools.m4 Normal file
View File

@ -0,0 +1,8 @@
AC_DEFUN_ONCE([MOO_AC_TOOLS],[
moo_srcdir=`cd $srcdir && pwd`
moo_srcdir="$moo_srcdir/$1"
AC_SUBST(moo_srcdir)
MOO_XML2H="$moo_srcdir/mooutils/xml2h.sh"
AC_SUBST(MOO_XML2H)
])

View File

@ -28,7 +28,6 @@ EXTRA_DIST =
CLEANFILES =
include ../mk/rc.mk
XML2H = $(srcdir)/../moo/mooutils/xml2h.sh
medit-credits.h: ../THANKS $(XML2H)
$(SHELL) $(XML2H) THANKS $(srcdir)/../THANKS > $@.tmp && \
mv $@.tmp $(srcdir)/medit-credits.h

View File

@ -3,10 +3,10 @@
# $(glade_files) should be a list of glade files
# $(glade_sources) is defined to be a list of generated *-glade.h files
%-glade.h: glade/%.glade $(top_srcdir)/moo/mooutils/xml2h.sh
$(SHELL) $(top_srcdir)/moo/mooutils/xml2h.sh `basename "$*" | sed -e "s/-/_/"`_glade_xml $< > $@.tmp && mv $@.tmp $@
%-glade.h: %.glade $(top_srcdir)/moo/mooutils/xml2h.sh
$(SHELL) $(top_srcdir)/moo/mooutils/xml2h.sh `basename "$*" | sed -e "s/-/_/"`_glade_xml $< > $@.tmp && mv $@.tmp $@
%-glade.h: glade/%.glade $(MOO_XML2H)
$(SHELL) $(MOO_XML2H) `basename "$*" | sed -e "s/-/_/"`_glade_xml $< > $@.tmp && mv $@.tmp $@
%-glade.h: %.glade $(MOO_XML2H)
$(SHELL) $(MOO_XML2H) `basename "$*" | sed -e "s/-/_/"`_glade_xml $< > $@.tmp && mv $@.tmp $@
# glade_sources = $(patsubst glade/%.glade,%-glade.h,$(glade_files))
glade_sources = $(patsubst %.glade,%-glade.h,$(patsubst glade/%.glade,%-glade.h,$(glade_files)))

View File

@ -3,8 +3,8 @@
# $(ui_files) should be a list of ui xml files
# $(ui_sources) is defined to be a list of generated *-ui.h files
%-ui.h: %.ui $(top_srcdir)/moo/mooutils/xml2h.sh
$(SHELL) $(top_srcdir)/moo/mooutils/xml2h.sh `basename "$*" | sed -e "s/-/_/"`_ui_xml $< > $@.tmp && mv $@.tmp $@
%-ui.h: %.ui $(MOO_XML2H)
$(SHELL) $(MOO_XML2H) `basename "$*" | sed -e "s/-/_/"`_ui_xml $< > $@.tmp && mv $@.tmp $@
ui_sources = $(patsubst %.ui,%-ui.h,$(ui_files))
BUILT_SOURCES += $(ui_sources)

View File

@ -17,7 +17,6 @@ astrings_sources = \
BUILT_SOURCES = \
as-plugin-glade.h
XML2H = $(srcdir)/../../../mooutils/xml2h.sh
as-plugin-glade.h: as-plugin.glade $(XML2H)
$(SHELL) $(XML2H) AS_PLUGIN_GLADE_UI $(srcdir)/as-plugin.glade > $@.tmp && \
mv $@.tmp $@

View File

@ -18,7 +18,6 @@ completion_sources = \
BUILT_SOURCES = \
completion-glade.h
XML2H = $(srcdir)/../../../mooutils/xml2h.sh
completion-glade.h: completion.glade $(XML2H)
$(SHELL) $(XML2H) COMPLETION_PLUGIN_GLADE_XML $(srcdir)/completion.glade > $@.tmp && \
mv $@.tmp $@