From: Andy Spencer Date: Wed, 9 Sep 2009 02:54:57 +0000 (+0000) Subject: Check for RSL in configure.ac X-Git-Tag: gis-v0.1~1 X-Git-Url: http://pileus.org/git/?p=grits;a=commitdiff_plain;h=0166a74c965b1e8466c90d8dc8dc49731506543e Check for RSL in configure.ac --- diff --git a/configure.ac b/configure.ac index 58a1103..5197755 100644 --- a/configure.ac +++ b/configure.ac @@ -16,10 +16,8 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.16 gtkglext-1.0) PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.26) # Define odd RSL install location -#AC_SUBST(RSL_CFLAGS, "-I/usr/local/trmm/GVBOX/include/") -#AC_SUBST(RSL_LIBS, "-L/usr/local/trmm/GVBOX/lib/ -lrsl") -AC_SUBST(RSL_CFLAGS, "") -AC_SUBST(RSL_LIBS, "-lrsl") +AC_CHECK_LIB(rsl, RSL_wsr88d_to_radar, RLS_LIBS="-lrsl") +AM_CONDITIONAL(HAVE_RSL, test "$RSL_LIBS" != "") # Output AC_CONFIG_FILES([ @@ -33,3 +31,8 @@ AC_CONFIG_FILES([ docs/api/Makefile ]) AC_OUTPUT + +# Print status messages +if test "$RSL_LIBS" = ""; then + echo " ** Warning, RSL not found, radar plugin disabled" +fi diff --git a/docs/api/Makefile.am b/docs/api/Makefile.am index 826840a..4c995bf 100644 --- a/docs/api/Makefile.am +++ b/docs/api/Makefile.am @@ -1,8 +1,13 @@ -AM_CPPFLAGS= $(RSL_CFLAGS) $(SOUP_CFLAGS) $(GLIB_CFLAGS) $(GTK_CFLAGS) -GTKDOC_LIBS=$(RSL_LIBS) $(SOUP_LIBS) $(GLIB_LIBS) $(GTK_LIBS) \ +AM_CPPFLAGS=$(SOUP_CFLAGS) $(GLIB_CFLAGS) $(GTK_CFLAGS) +GTKDOC_LIBS=$(SOUP_LIBS) $(GLIB_LIBS) $(GTK_LIBS) \ $(top_srcdir)/src/aweather-aweather-*.o \ - $(top_srcdir)/src/gis/libgis*.o \ - $(top_srcdir)/src/plugins/*.o + $(top_srcdir)/src/gis/libgis*.o +IGNORE_HFILES= +if HAVE_RSL +GTKDOC_LIBS += $(RSL_LIBS) $(top_srcdir)/src/plugins/*.o +else +IGNORE_HFILES += radar.h +endif DOC_MODULE=aweather DOC_SOURCE_DIR=$(top_srcdir)/src/ DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index a3520ee..52a7840 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -4,13 +4,14 @@ AM_LDFLAGS = -module -avoid-version plugindir = $(libdir)/gis -plugin_LTLIBRARIES = \ - radar.la +plugin_LTLIBRARIES = -radar_la_SOURCES = radar.c radar.h \ +if HAVE_RSL +plugin_LTLIBRARIES += radar.la +radar_la_SOURCES = radar.c radar.h \ marching.c marching.h \ radar-colormap.c -radar_la_CPPFLAGS = $(RSL_CFLAGS) $(AM_CPPFLAGS) -radar_la_LIBADD = $(RSL_LIBS) +radar_la_LIBADD = $(RSL_LIBS) +endif MAINTAINERCLEANFILES = Makefile.in