diff --git a/acconfig.h b/acconfig.h index ea6988f..3d82125 100644 --- a/acconfig.h +++ b/acconfig.h @@ -270,6 +270,10 @@ /* Define if lex declares yytext as a char * by default, not a char[]. */ #undef YYTEXT_POINTER +/* Enlightenment paths */ +#undef EROOT +#undef EBIN + /* Leave that blank line there!! Autoheader needs it. If you're adding to this file, keep in mind: diff --git a/api/Makefile.am b/api/Makefile.am index d1c1fbf..8bb6a75 100644 --- a/api/Makefile.am +++ b/api/Makefile.am @@ -2,6 +2,7 @@ lib_LTLIBRARIES = libepplet.la +include_HEADERS = epplet.h libepplet_la_SOURCES = epplet.c libepplet_la_DEPENDENCIES = $(top_builddir)/config.h libepplet_la_LDFLAGS = -version-info 1:0:1 diff --git a/api/epplet.h b/api/epplet.h.in similarity index 99% rename from api/epplet.h rename to api/epplet.h.in index 5f1cf93..8da413c 100644 --- a/api/epplet.h +++ b/api/epplet.h.in @@ -25,6 +25,9 @@ #include #include +#define EROOT "@EROOT@" +#define EBIN "@EBIN@" + /****************************************************************************/ /* Data structures & primitives */ /****************************************************************************/ diff --git a/configure.in b/configure.in index 67fc969..f6d8b0f 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl# $Id$ -AC_INIT(api/epplet.h) +AC_INIT(api/epplet.c) AM_INIT_AUTOMAKE(Epplets, 0.1) dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' @@ -191,6 +191,8 @@ else AC_MSG_RESULT(warning: EBIN environment variable not detected. Using $EBIN) AC_SUBST(EBIN) fi +AC_DEFINE_UNQUOTED(EROOT, "$EROOT") +AC_DEFINE_UNQUOTED(EBIN, "$EBIN") CFLAGS=${CFLAGS--O} LDFLAGS=${LDFLAGS--O} @@ -210,4 +212,14 @@ AM_CONFIG_HEADER(config.h) AC_OUTPUT(Makefile api/Makefile epplets/Makefile) +echo "creating api/epplet.h" +sed -e "s%@EROOT@%$EROOT%g" -e "s%@EBIN@%$EBIN%g" api/epplet.h.in > api/epplet.h.new +if (diff api/epplet.h.new api/epplet.h >/dev/null 2>&1); then + echo "api/epplet.h unchanged." + rm -f api/epplet.h.new +else + rm -f api/epplet.h + mv api/epplet.h.new api/epplet.h +fi + echo "Now type 'make' to build $PACKAGE $VERSION." diff --git a/epplets/Makefile.am b/epplets/Makefile.am index e82e83e..3291de1 100644 --- a/epplets/Makefile.am +++ b/epplets/Makefile.am @@ -31,7 +31,8 @@ EXTRA_DIST = E-Load.icon E-Clock.icon E-Net.icon E-Cpu.icon EppletTest.icon \ E-Clock-Image.png install-data-hook: - $(mkinstalldirs) $(EROOT)/epplet_icons; - for i in $(srcdir)/*.icon $(srcdir)/*.png; do \ - $(INSTALL_DATA) $$i $(EROOT)/epplet_icons/; \ + $(mkinstalldirs) $(EROOT)/epplet_icons + @for i in $(srcdir)/*.icon ; do \ + echo $(INSTALL_DATA) $$i $(EROOT)/epplet_icons/ ; \ + $(INSTALL_DATA) $$i $(EROOT)/epplet_icons/ ; \ done