summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2010-12-11 17:04:34 +0000
committerVincent Torri <vincent.torri@gmail.com>2010-12-11 17:04:34 +0000
commitd8765063db07cf941f3361a64958af5d70e54968 (patch)
treefc4701d531cf8d5b1b513d748d15a1b07661fe54 /legacy
parentee1d0dbc23ca8e408400969cf3e85a51f81c9bdf (diff)
* fix DSO problem
* simplify a bit the autotools * add the possibility to disable the test SVN revision: 55499
Diffstat (limited to 'legacy')
-rw-r--r--legacy/eeze/configure.ac11
-rw-r--r--legacy/eeze/m4/efl_binary.m478
-rw-r--r--legacy/eeze/src/bin/Makefile.am14
-rw-r--r--legacy/eeze/src/lib/Makefile.am4
4 files changed, 92 insertions, 15 deletions
diff --git a/legacy/eeze/configure.ac b/legacy/eeze/configure.ac
index a5f49c3fa2..1fb8ae6dad 100644
--- a/legacy/eeze/configure.ac
+++ b/legacy/eeze/configure.ac
@@ -52,7 +52,7 @@ AC_SUBST(VMAJ)
52 52
53### Needed information 53### Needed information
54 54
55requirement_eeze="ecore >= 1.0.0 libudev" 55requirement_eeze="ecore >= 1.0.0 eina >= 1.0.0 libudev"
56 56
57 57
58### Checks for programs 58### Checks for programs
@@ -77,8 +77,7 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
77 77
78### Checks for libraries 78### Checks for libraries
79 79
80PKG_CHECK_MODULES([ECORE], [ecore >= 1.0.0]) 80PKG_CHECK_MODULES([EEZE], [${requirement_eeze}])
81PKG_CHECK_MODULES([LIBUDEV], [libudev])
82 81
83udev_version=$(pkg-config libudev --modversion) 82udev_version=$(pkg-config libudev --modversion)
84 83
@@ -111,6 +110,10 @@ fi
111EFL_COMPILER_FLAG([-Wshadow]) 110EFL_COMPILER_FLAG([-Wshadow])
112 111
113 112
113### Binary
114
115EFL_ENABLE_BIN([eeze-udev-test], ["yes"])
116
114AC_SUBST(requirement_eeze) 117AC_SUBST(requirement_eeze)
115 118
116 119
@@ -137,6 +140,8 @@ echo "------------------------------------------------------------------------"
137echo 140echo
138echo "Configuration Options Summary:" 141echo "Configuration Options Summary:"
139echo 142echo
143echo "Test...................: ${have_eeze_udev_test}"
144echo
140echo "Documentation..........: ${build_doc}" 145echo "Documentation..........: ${build_doc}"
141echo 146echo
142echo "Compilation............: make (or gmake)" 147echo "Compilation............: make (or gmake)"
diff --git a/legacy/eeze/m4/efl_binary.m4 b/legacy/eeze/m4/efl_binary.m4
new file mode 100644
index 0000000000..0ad38ce1c2
--- /dev/null
+++ b/legacy/eeze/m4/efl_binary.m4
@@ -0,0 +1,78 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that checks if a binary is built or not
5
6dnl Usage: EFL_ENABLE_BIN(binary, dep[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
8dnl Define have_binary (- is transformed into _)
9dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being transformed into _)
10
11AC_DEFUN([EFL_ENABLE_BIN],
12[
13
14m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
15m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
16
17dnl configure option
18
19AC_ARG_ENABLE([$1],
20 [AC_HELP_STRING([--disable-$1], [disable building of ]DOWN)],
21 [
22 if test "x${enableval}" = "xyes" ; then
23 have_[]m4_defn([DOWN])="yes"
24 else
25 have_[]m4_defn([DOWN])="no"
26 fi
27 ],
28 [have_[]m4_defn([DOWN])=$2])
29
30AC_MSG_CHECKING([whether to build ]DOWN[ binary])
31AC_MSG_RESULT([$have_[]m4_defn([DOWN])])
32
33if test "x$have_[]m4_defn([DOWN])" = "xyes"; then
34 UP[]_PRG=DOWN[${EXEEXT}]
35fi
36
37AC_SUBST(UP[]_PRG)
38
39AM_CONDITIONAL(BUILD_[]UP, test "x$have_[]m4_defn([DOWN])" = "xyes")
40
41AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$3], [$4])
42
43])
44
45dnl Macro that specifies the binary to be used
46
47dnl Usage: EFL_WITH_BIN(binary, package, msg)
48dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
49dnl Define with_binary (- is transformed into _)
50dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being transformed into _)
51
52AC_DEFUN([EFL_WITH_BIN],
53[
54
55m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
56m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
57
58AC_REQUIRE([PKG_PROG_PKG_CONFIG])
59AC_MSG_NOTICE([$PKG_CONFIG])
60
61with_[]m4_defn([DOWN])=m4_esyscmd($PKG_CONFIG --variable=prefix $2)/bin/m4_defn([DOWN])
62
63dnl configure option
64
65AC_ARG_WITH([$1],
66 [AC_HELP_STRING([--with-$1-bin=PATH], [specify a specific path to ]DOWN)],
67 [
68 with_[]m4_defn([DOWN])=$withval
69 _efl_msg="( explicitely set)"
70 ])
71
72AC_MSG_NOTICE([$msg: ]m4_defn([DOWN])[$_efl_msg])
73
74AC_SUBST(with_[]m4_defn([DOWN]))
75
76AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$4], [$5])
77
78])
diff --git a/legacy/eeze/src/bin/Makefile.am b/legacy/eeze/src/bin/Makefile.am
index 0c4c1beb2b..029ddc1217 100644
--- a/legacy/eeze/src/bin/Makefile.am
+++ b/legacy/eeze/src/bin/Makefile.am
@@ -1,14 +1,8 @@
1MAINTAINERCLEANFILES = Makefile.in 1MAINTAINERCLEANFILES = Makefile.in
2 2
3EEZE_CPPFLAGS = \ 3bin_PROGRAMS = @EEZE_UDEV_TEST_PRG@
4-I$(top_srcdir)/src/lib \ 4EXTRA_PROGRAMS = eeze_udev_test
5@ECORE_CFLAGS@ \
6@LIBUDEV_CFLAGS@
7
8EEZE_UDEV_PROG = eeze_udev_test
9
10bin_PROGRAMS = eeze_udev_test
11 5
12eeze_udev_test_SOURCES = eeze_udev_test.c 6eeze_udev_test_SOURCES = eeze_udev_test.c
13eeze_udev_test_CPPFLAGS = $(EEZE_CPPFLAGS) 7eeze_udev_test_CPPFLAGS = -I$(top_srcdir)/src/lib @EEZE_CFLAGS@
14eeze_udev_test_LDADD = $(top_builddir)/src/lib/libeeze.la 8eeze_udev_test_LDADD = $(top_builddir)/src/lib/libeeze.la @EEZE_LIBS@
diff --git a/legacy/eeze/src/lib/Makefile.am b/legacy/eeze/src/lib/Makefile.am
index 877f485944..0633d00b35 100644
--- a/legacy/eeze/src/lib/Makefile.am
+++ b/legacy/eeze/src/lib/Makefile.am
@@ -1,6 +1,6 @@
1MAINTAINERCLEANFILES = Makefile.in 1MAINTAINERCLEANFILES = Makefile.in
2 2
3AM_CPPFLAGS = @ECORE_CFLAGS@ @LIBUDEV_CFLAGS@ 3AM_CPPFLAGS = @EEZE_CFLAGS@
4 4
5lib_LTLIBRARIES = libeeze.la 5lib_LTLIBRARIES = libeeze.la
6includes_HEADERS = Eeze.h 6includes_HEADERS = Eeze.h
@@ -14,7 +14,7 @@ eeze_udev_find.c \
14eeze_udev_walk.c \ 14eeze_udev_walk.c \
15eeze_udev_private.c 15eeze_udev_private.c
16 16
17libeeze_la_LIBADD = @ECORE_LIBS@ @LIBUDEV_LIBS@ 17libeeze_la_LIBADD = @EEZE_LIBS@
18libeeze_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@ 18libeeze_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@
19 19
20EXTRA_DIST = eeze_udev_private.h 20EXTRA_DIST = eeze_udev_private.h