summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Middelschulte <leif.middelschulte@gmail.com>2013-02-24 23:59:11 +0000
committerLeif Middelschulte <leif.middelschulte@gmail.com>2013-02-24 23:59:11 +0000
commit6d18658c5ef71eae29572f80d7c916397bf685c6 (patch)
tree4fcf2a468025fcaf7fc35a6b5a43b629174afe21
parentff8fbe6e4afcc53735525087c305de3cbd35ea22 (diff)
Add libbsd dependency for Linux. Use <string.h> on all other systems.
SVN revision: 84352
-rw-r--r--configure.ac10
-rw-r--r--src/Makefile.am5
-rw-r--r--src/sourcedrop.c6
3 files changed, 18 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 4344630..5b27776 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,16 @@ AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
29 29
30PKG_CHECK_MODULES(JSON, [json]) 30PKG_CHECK_MODULES(JSON, [json])
31 31
32#
33# Platform specific setup
34#
35#############################
36case $host_os in
37 linux*)
38 PKG_CHECK_MODULES(BSD, [libbsd])
39 ;;
40esac
41
32# Find edje_cc 42# Find edje_cc
33PKG_CHECK_MODULES(EDJE, [edje >= 0.5.0]) 43PKG_CHECK_MODULES(EDJE, [edje >= 0.5.0])
34AC_ARG_WITH(edje-cc, 44AC_ARG_WITH(edje-cc,
diff --git a/src/Makefile.am b/src/Makefile.am
index 87ed16d..dcfd792 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,7 +4,8 @@ INCLUDES = -I. \
4 -I$(top_srcdir) \ 4 -I$(top_srcdir) \
5 -I$(includedir) \ 5 -I$(includedir) \
6 @E_CFLAGS@ \ 6 @E_CFLAGS@ \
7 @JSON_CFLAGS@ 7 @JSON_CFLAGS@ \
8 @BSD_CFLAGS@
8 9
9pkgdir = $(datadir)/$(MODULE_ARCH) 10pkgdir = $(datadir)/$(MODULE_ARCH)
10pkg_LTLIBRARIES = module.la 11pkg_LTLIBRARIES = module.la
@@ -13,7 +14,7 @@ module_la_SOURCES = e_mod_main.c \
13 e_share.h \ 14 e_share.h \
14 sourcedrop.c 15 sourcedrop.c
15 16
16module_la_LIBADD = @E_LIBS@ @JSON_LIBS@ -lm -lbsd 17module_la_LIBADD = @E_LIBS@ @JSON_LIBS@ @BSD_LIBS@ -lm
17module_la_LDFLAGS = -module -avoid-version 18module_la_LDFLAGS = -module -avoid-version
18module_la_DEPENDENCIES = $(top_builddir)/config.h 19module_la_DEPENDENCIES = $(top_builddir)/config.h
19 20
diff --git a/src/sourcedrop.c b/src/sourcedrop.c
index 274457c..8a790a9 100644
--- a/src/sourcedrop.c
+++ b/src/sourcedrop.c
@@ -1,6 +1,10 @@
1#include <ctype.h> 1#include <ctype.h>
2#include <json/json.h> 2#include <json/json.h>
3#include <bsd/string.h> 3#ifdef __linux__
4#include <bsd/string.h> // strlcpy, etc. found in libbsd
5#else
6#include <string.h>
7#endif
4 8
5#include "e_mod_main.h" 9#include "e_mod_main.h"
6#include "e_share.h" 10#include "e_share.h"