summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2014-09-04 17:10:37 +0200
committerCedric BAIL <cedric@osg.samsung.com>2014-09-04 17:33:05 +0200
commitde14acab86b68367c3e2c601d7bce3650427ffa8 (patch)
tree0baf6800f2f5ed71a10c78da190e15ef1d75dbaa
parent7ae9a2e0440e32b77b9f39992fc4bc6cf454dc1c (diff)
autotools: simplify .pc.in.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--configure.ac26
-rw-r--r--doc/widgets/Makefile.am3
-rw-r--r--elementary.pc.in4
-rw-r--r--m4/elm_check_backend.m42
-rw-r--r--m4/elm_check_option.m44
-rw-r--r--src/bin/Makefile.am15
-rw-r--r--src/examples/Makefile.am1
-rw-r--r--src/lib/Makefile.am1
-rw-r--r--src/tests/Makefile.am6
9 files changed, 26 insertions, 36 deletions
diff --git a/configure.ac b/configure.ac
index 2d2514752..dbcf406a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -185,16 +185,16 @@ EFL_ENABLE_BIN([elementary-config])
185 185
186### Checks for libraries 186### Checks for libraries
187 187
188requirement_elm="" 188requirement_elm_pc=""
189 189
190case "$host_os" in 190case "$host_os" in
191 mingw*) 191 mingw*)
192 requirement_elm="evil >= efl_version" 192 requirement_elm_pc="evil >= efl_version"
193 ;; 193 ;;
194esac 194esac
195 195
196requirement_elm="\ 196requirement_elm_pc="\
197 ${requirement_elm} \ 197 ${requirement_elm_pc} \
198 efl >= efl_version \ 198 efl >= efl_version \
199 eina >= efl_version \ 199 eina >= efl_version \
200 eet >= efl_version \ 200 eet >= efl_version \
@@ -232,8 +232,7 @@ ELM_CHECK_OPTION([eweather], [0.2.0])
232ELM_CHECK_OPTION([emap], [0.1.0]) 232ELM_CHECK_OPTION([emap], [0.1.0])
233ELM_CHECK_OPTION([eweb]) 233ELM_CHECK_OPTION([eweb])
234 234
235PKG_CHECK_MODULES([ELEMENTARY], 235PKG_CHECK_MODULES([ELEMENTARY], [${requirement_elm_pc}])
236 [${requirement_elm}])
237 236
238EFL_ENABLE_EO_API_SUPPORT 237EFL_ENABLE_EO_API_SUPPORT
239EFL_ENABLE_BETA_API_SUPPORT 238EFL_ENABLE_BETA_API_SUPPORT
@@ -247,7 +246,7 @@ if test "x${HAVE_CXX11}" = "x1" -a "x${want_cxx11}" = "xyes"; then
247 evas-cxx >= efl_version 246 evas-cxx >= efl_version
248 ], 247 ],
249 [ 248 [
250 requirement_elm="${requirement_elm} \ 249 requirement_elm_pc="${requirement_elm_pc} \
251 eo-cxx >= efl_version \ 250 eo-cxx >= efl_version \
252 eina-cxx >= efl_version \ 251 eina-cxx >= efl_version \
253 evas-cxx >= efl_version \ 252 evas-cxx >= efl_version \
@@ -273,7 +272,7 @@ AC_DEFINE_UNQUOTED([MODULE_EDJE], ["$MODULE_EDJE"], ["Edje module architecture"]
273DEPS_EOLIAN_FLAGS=`${PKG_CONFIG} --variable=eolian_flags eo evas edje ecore efl` 272DEPS_EOLIAN_FLAGS=`${PKG_CONFIG} --variable=eolian_flags eo evas edje ecore efl`
274AC_SUBST([DEPS_EOLIAN_FLAGS]) 273AC_SUBST([DEPS_EOLIAN_FLAGS])
275 274
276my_libs="-lm" 275requirement_elm_libs="-lm"
277 276
278# sockets 277# sockets
279 278
@@ -285,7 +284,7 @@ case "$host_os" in
285 AC_CHECK_LIB([socket], [connect], 284 AC_CHECK_LIB([socket], [connect],
286 [ 285 [
287 have_socket="yes" 286 have_socket="yes"
288 my_libs="-lsocket ${my_libs}" 287 requirement_elm_libs="-lsocket ${requirement_elm_libs}"
289 ], 288 ],
290 [have_socket="no"]) 289 [have_socket="no"])
291 ;; 290 ;;
@@ -307,7 +306,7 @@ case "$host_os" in
307dnl managed by evil 306dnl managed by evil
308 AC_DEFINE([HAVE_DLADDR], [1], [Define to 1 if you have the `dladdr' function.]) 307 AC_DEFINE([HAVE_DLADDR], [1], [Define to 1 if you have the `dladdr' function.])
309 have_dlopen="yes" 308 have_dlopen="yes"
310 my_libs="-ldl ${my_libs}" 309 requirement_elm_libs="-ldl ${requirement_elm_libs}"
311 ;; 310 ;;
312 *solaris*) 311 *solaris*)
313 have_dlopen="yes" 312 have_dlopen="yes"
@@ -319,7 +318,7 @@ dnl managed by evil
319 AC_CHECK_LIB([dl], [dlopen], [res=yes], [res=no]) 318 AC_CHECK_LIB([dl], [dlopen], [res=yes], [res=no])
320 if test "x$res" = "xyes"; then 319 if test "x$res" = "xyes"; then
321 AC_CHECK_LIB([dl], [dladdr], AC_DEFINE([HAVE_DLADDR], [1], [Define to 1 if you have the `dladdr' function.])) 320 AC_CHECK_LIB([dl], [dladdr], AC_DEFINE([HAVE_DLADDR], [1], [Define to 1 if you have the `dladdr' function.]))
322 my_libs="-ldl ${my_libs}" 321 requirement_elm_libs="-ldl ${requirement_elm_libs}"
323 have_dlopen="yes" 322 have_dlopen="yes"
324 fi 323 fi
325 ;; 324 ;;
@@ -327,8 +326,9 @@ esac
327 326
328AM_CONDITIONAL([BUILD_MODULES], [test "x$have_dlopen" = "xyes"]) 327AM_CONDITIONAL([BUILD_MODULES], [test "x$have_dlopen" = "xyes"])
329 328
330AC_SUBST([my_libs]) 329ELEMENTARY_LIBS="${ELEMENTARY_LIBS} ${requirement_elm_libs}"
331AC_SUBST([requirement_elm]) 330
331AC_SUBST([requirement_elm_pc])
332 332
333# check unit testing library 333# check unit testing library
334if test "${build_tests}" = "regular"; then 334if test "${build_tests}" = "regular"; then
diff --git a/doc/widgets/Makefile.am b/doc/widgets/Makefile.am
index a53024e1d..5cc58f39e 100644
--- a/doc/widgets/Makefile.am
+++ b/doc/widgets/Makefile.am
@@ -97,8 +97,7 @@ widget_preview_web \
97widget_preview_win 97widget_preview_win
98 98
99LDADD = $(top_builddir)/src/lib/libelementary.la \ 99LDADD = $(top_builddir)/src/lib/libelementary.la \
100@ELEMENTARY_LIBS@ \ 100@ELEMENTARY_LIBS@
101@my_libs@
102 101
103endif 102endif
104 103
diff --git a/elementary.pc.in b/elementary.pc.in
index 4288f20f1..1772c1330 100644
--- a/elementary.pc.in
+++ b/elementary.pc.in
@@ -11,7 +11,7 @@ eolian_flags=-I${eoincludedir}/elementary-@VMAJ@
11 11
12Name: elementary 12Name: elementary
13Description: Mobile device touchscreen widget library 13Description: Mobile device touchscreen widget library
14Requires.private: @requirement_elm@ 14Requires.private: @requirement_elm_pc@
15Version: @VERSION@ 15Version: @VERSION@
16Libs: -L${libdir} -lelementary @my_libs@ @ELEMENTARY_LIBS@ @ELEMENTARY_WEB_LIBS@ @ELEMENTARY_EMAP_LIBS@ 16Libs: -L${libdir} -lelementary @ELEMENTARY_LIBS@ @ELEMENTARY_WEB_LIBS@ @ELEMENTARY_EMAP_LIBS@
17Cflags: -I${includedir}/elementary-@VMAJ@ 17Cflags: -I${includedir}/elementary-@VMAJ@
diff --git a/m4/elm_check_backend.m4 b/m4/elm_check_backend.m4
index 476f60924..471218f90 100644
--- a/m4/elm_check_backend.m4
+++ b/m4/elm_check_backend.m4
@@ -20,7 +20,7 @@ if test "x${want_backend}" != "xno"; then
20 [ 20 [
21 AC_DEFINE([HAVE_ELEMENTARY_]UP, [1], [$1 support for Elementary]) 21 AC_DEFINE([HAVE_ELEMENTARY_]UP, [1], [$1 support for Elementary])
22 have_elementary_[]DOWN="yes" 22 have_elementary_[]DOWN="yes"
23 requirement_elm="ecore-[]DOWN >= efl_version ${requirement_elm}" 23 requirement_elm_pc="ecore-[]DOWN >= efl_version ${requirement_elm_pc}"
24 ], 24 ],
25 [have_elementary_]DOWN[="no"] 25 [have_elementary_]DOWN[="no"]
26 ) 26 )
diff --git a/m4/elm_check_option.m4 b/m4/elm_check_option.m4
index abad0f167..7690d0ca6 100644
--- a/m4/elm_check_option.m4
+++ b/m4/elm_check_option.m4
@@ -23,7 +23,7 @@ if test "x${want_option}" != "xno"; then
23 AC_DEFINE([HAVE_ELEMENTARY_]UP, [1], [$1 support for Elementary]) 23 AC_DEFINE([HAVE_ELEMENTARY_]UP, [1], [$1 support for Elementary])
24 have_elementary_[]DOWN="yes" 24 have_elementary_[]DOWN="yes"
25 ELM_[]UP[]_DEF="#define" 25 ELM_[]UP[]_DEF="#define"
26 requirement_elm="[]DOWN >= $2 ${requirement_elm}" 26 requirement_elm_pc="[]DOWN >= $2 ${requirement_elm_pc}"
27 ], 27 ],
28 [have_elementary_]DOWN[="no"] 28 [have_elementary_]DOWN[="no"]
29 ) 29 )
@@ -83,7 +83,7 @@ if test "x${want_elementary_web}" != "xnone"; then
83 ["WebKit's data dir"]) 83 ["WebKit's data dir"])
84 ELM_WEB2_DEF="#define" 84 ELM_WEB2_DEF="#define"
85 elementary_web=${want_elementary_web} 85 elementary_web=${want_elementary_web}
86 requirement_elm="${want_elementary_web} ${requirement_elm}" 86 requirement_elm_pc="${want_elementary_web} ${requirement_elm_pc}"
87 ], 87 ],
88 [elementary_web="no"] 88 [elementary_web="no"]
89 ) 89 )
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 279002382..a736b59a9 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -129,8 +129,7 @@ test_win_dialog.c \
129test.h 129test.h
130 130
131elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la \ 131elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la \
132 @ELEMENTARY_LIBS@ \ 132 @ELEMENTARY_LIBS@
133 @my_libs@
134elementary_test_CFLAGS = 133elementary_test_CFLAGS =
135elementary_test_LDFLAGS = 134elementary_test_LDFLAGS =
136 135
@@ -138,8 +137,7 @@ elementary_config_SOURCES = \
138config.c 137config.c
139 138
140elementary_config_LDADD = $(top_builddir)/src/lib/libelementary.la \ 139elementary_config_LDADD = $(top_builddir)/src/lib/libelementary.la \
141 @ELEMENTARY_LIBS@ \ 140 @ELEMENTARY_LIBS@
142 @my_libs@
143elementary_config_LDFLAGS = 141elementary_config_LDFLAGS =
144 142
145elementary_codegen_SOURCES = \ 143elementary_codegen_SOURCES = \
@@ -147,8 +145,7 @@ elementary_codegen.c
147 145
148elementary_codegen_LDADD = \ 146elementary_codegen_LDADD = \
149 $(top_builddir)/src/lib/libelementary.la \ 147 $(top_builddir)/src/lib/libelementary.la \
150 @ELEMENTARY_LIBS@ \ 148 @ELEMENTARY_LIBS@
151 @my_libs@
152elementary_codegen_LDFLAGS = 149elementary_codegen_LDFLAGS =
153 150
154noinst_HEADERS = \ 151noinst_HEADERS = \
@@ -163,14 +160,12 @@ elm_prefs_cc_handlers.c
163 160
164elm_prefs_cc_LDADD = \ 161elm_prefs_cc_LDADD = \
165$(top_builddir)/src/lib/libelementary.la \ 162$(top_builddir)/src/lib/libelementary.la \
166@ELEMENTARY_LIBS@ \ 163@ELEMENTARY_LIBS@
167@my_libs@
168 164
169if BUILD_QUICKLAUNCH 165if BUILD_QUICKLAUNCH
170elementary_quicklaunch_SOURCES = quicklaunch.c 166elementary_quicklaunch_SOURCES = quicklaunch.c
171elementary_quicklaunch_LDADD = $(top_builddir)/src/lib/libelementary.la \ 167elementary_quicklaunch_LDADD = $(top_builddir)/src/lib/libelementary.la \
172 @ELEMENTARY_LIBS@ \ 168 @ELEMENTARY_LIBS@
173 @my_libs@
174elementary_quicklaunch_LDFLAGS = 169elementary_quicklaunch_LDFLAGS =
175 170
176if BUILD_RUN 171if BUILD_RUN
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
index be1d432f1..3edf636cd 100644
--- a/src/examples/Makefile.am
+++ b/src/examples/Makefile.am
@@ -19,7 +19,6 @@ AM_CPPFLAGS = \
19@ELEMENTARY_CFLAGS@ 19@ELEMENTARY_CFLAGS@
20 20
21LDADD = \ 21LDADD = \
22-lm \
23@ELEMENTARY_LIBS@ \ 22@ELEMENTARY_LIBS@ \
24$(top_builddir)/src/lib/libelementary.la 23$(top_builddir)/src/lib/libelementary.la
25 24
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index a676d9f23..6706a4d5d 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -499,7 +499,6 @@ elu_ews_wm.c
499 499
500libelementary_la_CFLAGS = 500libelementary_la_CFLAGS =
501libelementary_la_LIBADD = \ 501libelementary_la_LIBADD = \
502@my_libs@ \
503@ELEMENTARY_LIBS@ \ 502@ELEMENTARY_LIBS@ \
504@LTLIBINTL@ 503@LTLIBINTL@
505 504
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index 1597c4706..185669c7a 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -84,8 +84,7 @@ elm_suite_CPPFLAGS = \
84elm_suite_LDADD = \ 84elm_suite_LDADD = \
85 $(top_builddir)/src/lib/libelementary.la \ 85 $(top_builddir)/src/lib/libelementary.la \
86 @CHECK_LIBS@ \ 86 @CHECK_LIBS@ \
87 @ELEMENTARY_LIBS@ \ 87 @ELEMENTARY_LIBS@
88 @my_libs@
89 88
90if HAVE_CXX11 89if HAVE_CXX11
91TESTS += elm_cxx_suite 90TESTS += elm_cxx_suite
@@ -103,6 +102,5 @@ elm_cxx_suite_CPPFLAGS = \
103elm_cxx_suite_LDADD = \ 102elm_cxx_suite_LDADD = \
104 $(top_builddir)/src/lib/libelementary.la \ 103 $(top_builddir)/src/lib/libelementary.la \
105 @CHECK_LIBS@ \ 104 @CHECK_LIBS@ \
106 @ELEMENTARY_LIBS@ \ 105 @ELEMENTARY_LIBS@
107 @my_libs@
108endif 106endif