Autofunkey!

SVN revision: 33076
mpdule-0.18
Sthithaprajna Garapaty 15 years ago committed by Sthithaprajna Garapaty
parent 8be8d35e65
commit d79c0060c7
  1. 10
      Makefile.am
  2. 100
      configure.in
  3. 5
      e_mod_main.c

@ -2,7 +2,6 @@ MAINTAINERCLEANFILES = Makefile.in
SUBDIRS =
EDJE_CC = @edje_cc@
EDJE_FLAGS = -v \
-id $(top_srcdir) \
-fd $(top_srcdir)
@ -23,19 +22,20 @@ CONFIG_CLEAN_FILES = e_modules-mpdule.spec mpdule.edj
INCLUDES = -I. \
-I$(top_srcdir) \
-I$(includedir) \
@e_cflags@
@e_cflags@ @MPD_CFLAGS@
pkgdir = $(datadir)/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
module_la_SOURCES = e_mod_main.c \
e_mod_main.h \
e_mod_config.c
module_la_LIBADD = @e_libs@
module_la_LIBADD = @e_libs@ @MPD_LIBS@
module_la_LDFLAGS = -module -avoid-version
module_la_DEPENDENCIES = $(top_builddir)/config.h $(top_builddir)/mpdule.edj
%.edj: %.edc
mpdule.edj: mpdule.edc
$(EDJE_CC) $(EDJE_FLAGS) $< $@
clean-local:
rm -rf *.edj *~
rm -rf mixer.edj *~

@ -3,21 +3,22 @@ dnl Process this file with autoconf to produce a configure script.
# get rid of that stupid cache mechanism
rm -f config.cache
AC_INIT(configure.in)
AC_INIT(mpdule, 0.0.1, iamsthitha@gmail.com)
AC_PREREQ(2.59)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE(1.8)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(mpdule, 0.0.1)
AM_CONFIG_HEADER(config.h)
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS(sys/time.h libmpd/libmpdclient.h)
AC_C_CONST
AM_ENABLE_SHARED
AM_PROG_LIBTOOL
define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
AC_PROG_LIBTOOL
ALL_LINGUAS=""
AC_SUBST(ALL_LINGUAS)
@ -29,77 +30,36 @@ MODULE_ARCH="$host_os-$host_cpu"
AC_SUBST(MODULE_ARCH)
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
CPPFLAGS="`enlightenment-config --cflags` `pkg-config libmpd --cflags`"
LDFLAGS="`enlightenment-config --libs` `pkg-config libmpd --libs`"
dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${HOME}/.e/e/modules/${PACKAGE}", "Package installed data destination")
datadir="${HOME}/.e/e/modules/${PACKAGE}"
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${libdir}/enlightenment/modules/${PACKAGE}", "Package installed data destination")
datadir="${libdir}/enlightenment/modules/${PACKAGE}"
fi
AC_PREFIX_DEFAULT(${HOME}/.e/e)
if test "x$prefix" = "xNONE"; then
datarootdir=${ac_default_prefix}
else
datarootdir=${prefix}/share
fi
localedir=${datarootdir}/locale
AC_SUBST(LOCALEDIR, "${localedir}")
AC_DEFINE_UNQUOTED(LOCALEDIR, "${localedir}", [Module Locale Directory])
#AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
#AC_SUBST(dlopen_libs)
AC_ARG_WITH(edje-config,
[ --with-edje-config=EDJE_CONFIG use edje-config specified ],
[
EDJE_CONFIG=$withval;
echo "using "$EDJE_CONFIG" for edje-config";
/
],[
PROG="edje-config";
AC_PATH_PROG(EDJE_CONFIG, $PROG, "", $PATH)
])
edje_cflags=`$EDJE_CONFIG --cflags`
edje_libs=`$EDJE_CONFIG --libs`
AC_SUBST(edje_cflags)
AC_SUBST(edje_libs)
uname=`uname`
edje_cc="`$EDJE_CONFIG --prefix`/bin/edje_cc"
AC_ARG_WITH(edje-cc,
[ --with-edje-cc=PATH specify a specific path to edje_cc],
[
v=$withval;
edje_cc=$v
echo " Enlightenment edje_cc explicitly set to "$edje_cc;
],[
edje_cc="`$EDJE_CONFIG --prefix`/bin/edje_cc"
])
AC_SUBST(edje_cc)
#
# Check EFL Libs
#
AC_PATH_PROG(EDJE_CC, "edje_cc", "", $PATH)
AC_ARG_WITH(enlightenment-config,
[ --with-enlightenment-config=E_CONFIG use enlightenment-config specified ],
[
E_CONFIG=$withval;
echo "using "$E_CONFIG" for enlightenment-config";
],[
PROG="enlightenment-config";
AC_PATH_PROG(E_CONFIG, $PROG, "", $PATH)
])
#
# Check Enlightenment
#
AC_PATH_PROG(E_CONFIG, "enlightenment-config", "", $PATH)
e_cflags=`$E_CONFIG --cflags`
e_libs=`$E_CONFIG --libs`
e_modules=`$E_CONFIG --module-dir`
AC_SUBST(e_cflags)
AC_SUBST(e_libs)
AC_SUBST(e_modules)
#
# Check MPD
#
PKG_CHECK_MODULES(MPD, libmpd)
datadir="${e_modules}/${PACKAGE}"
AC_ARG_ENABLE(homedir-install,
AS_HELP_STRING([--enable-homedir-install], [Install module in homedir]),
[ datadir="${HOME}/.e/e/modules/${PACKAGE}" ]
)
AC_OUTPUT([
Makefile
e_modules-mpdule.spec
],[
])
])

@ -473,7 +473,10 @@ _mpdule_update_song(Instance *inst)
EAPI void *
e_modapi_init (E_Module * m)
{
bindtextdomain (PACKAGE, LOCALEDIR);
char buf[4096];
snprintf (buf, sizeof (buf), "%s/locale", e_module_dir_get (m));
bindtextdomain (PACKAGE, buf);
bind_textdomain_codeset (PACKAGE, "UTF-8");
conf_item_edd = E_CONFIG_DD_NEW ("MPDule_Config_Item", Config_Item);

Loading…
Cancel
Save