summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-03-23 12:56:14 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-03-23 13:24:41 -0700
commitc2a1c49ab2042f559b28e840e54feb8494888e0e (patch)
treec6eb110b7c479499854eede9d0c3ab0a80c9a11a /m4
parent9340855597e7e465435c69b6278650346688da14 (diff)
elementary: move all legacy files to their expected new location.
Diffstat (limited to 'm4')
-rw-r--r--m4/elm_check_backend.m438
-rw-r--r--m4/elm_check_option.m460
-rw-r--r--m4/elm_quicklaunch.m424
3 files changed, 122 insertions, 0 deletions
diff --git a/m4/elm_check_backend.m4 b/m4/elm_check_backend.m4
new file mode 100644
index 0000000000..471218f90e
--- /dev/null
+++ b/m4/elm_check_backend.m4
@@ -0,0 +1,38 @@
1
2dnl use: ELM_CHECK_BACKEND(engine)
3AC_DEFUN([ELM_CHECK_BACKEND],
4[dnl
5m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
6m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
7
8have_elementary_[]DOWN="no"
9
10AC_ARG_ENABLE([ecore-]DOWN,
11 [AC_HELP_STRING([--disable-ecore-]DOWN, [disable ecore-]DOWN[ support. @<:@default=detect@:>@])],
12 [want_backend=$enableval],
13 [want_backend="auto"])
14
15AC_MSG_CHECKING([whether to enable $1 backend])
16AC_MSG_RESULT([${want_backend}])
17
18if test "x${want_backend}" != "xno"; then
19 PKG_CHECK_EXISTS([ecore-]DOWN[ >= efl_version],
20 [
21 AC_DEFINE([HAVE_ELEMENTARY_]UP, [1], [$1 support for Elementary])
22 have_elementary_[]DOWN="yes"
23 requirement_elm_pc="ecore-[]DOWN >= efl_version ${requirement_elm_pc}"
24 ],
25 [have_elementary_]DOWN[="no"]
26 )
27fi
28
29AC_MSG_CHECKING([whether to build $1 backend])
30AC_MSG_RESULT([${have_elementary_[]DOWN}])
31
32if test "x${want_backend}" = "xyes" && test "x$have_elementary_[]DOWN" = "xno"; then
33 AC_MSG_ERROR([ecore-]DOWN[ support requested, but ecore-]DOWN[ was not found by pkg-config.])
34fi
35
36m4_popdef([UP])dnl
37m4_popdef([DOWN])dnl
38])
diff --git a/m4/elm_check_option.m4 b/m4/elm_check_option.m4
new file mode 100644
index 0000000000..999636ad32
--- /dev/null
+++ b/m4/elm_check_option.m4
@@ -0,0 +1,60 @@
1
2dnl use: ELM_CHECK_OPTION_DEP(option, pkgver)
3AC_DEFUN([ELM_CHECK_OPTION_DEP],
4[dnl
5
6m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
7m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
8
9ELM_[]UP[]_DEF="#undef"
10have_elementary_[]DOWN="no"
11
12AC_ARG_ENABLE(DOWN,
13 [AS_HELP_STRING([--disable-]DOWN, [disable ]DOWN[ support. @<:@default=detect@:>@])],
14 [want_option=$enableval],
15 [want_option="auto"])
16
17AC_MSG_CHECKING([whether to enable $1 option])
18AC_MSG_RESULT([${want_option}])
19
20if test "x${want_option}" != "xno"; then
21 PKG_CHECK_EXISTS(DOWN[ >= $2],
22 [
23 AC_DEFINE([HAVE_ELEMENTARY_]UP, [1], [$1 support for Elementary])
24 have_elementary_[]DOWN="yes"
25 ELM_[]UP[]_DEF="#define"
26 requirement_elm_pc="[]DOWN >= $2 ${requirement_elm_pc}"
27 ],
28 [have_elementary_]DOWN[="no"]
29 )
30fi
31
32AC_MSG_CHECKING([whether to build $1 option])
33AC_MSG_RESULT([${have_elementary_[]DOWN}])
34
35if test "x${want_elementary_[]DOWN}" = "xyes" && test "x${have_elementary_[]DOWN}" = "xno"; then
36 AC_MSG_ERROR([$1 support requested, but $1 was not found by pkg-config.])
37fi
38
39AC_SUBST([ELM_]UP[_DEF])
40
41m4_popdef([UP])dnl
42m4_popdef([DOWN])dnl
43])
44
45dnl use: ELM_CHECK_OPTION(option, pkgver)
46AC_DEFUN([ELM_CHECK_OPTION],
47[dnl
48
49m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
50m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
51
52if test "x$1" = "xeweb" ; then
53 ELM_CHECK_OPTION_DEP_EWK2
54else
55 ELM_CHECK_OPTION_DEP($1, $2)
56fi
57
58m4_popdef([UP])dnl
59m4_popdef([DOWN])dnl
60])
diff --git a/m4/elm_quicklaunch.m4 b/m4/elm_quicklaunch.m4
new file mode 100644
index 0000000000..3db9945f02
--- /dev/null
+++ b/m4/elm_quicklaunch.m4
@@ -0,0 +1,24 @@
1dnl Copyright (C) 2013 Cedric Bail <cedric dot bail at samsung dot com>
2dnl That code is public domain and can be freely used or copied
3
4dnl Macro that check if -pie -rdynamic can be given to ld
5
6dnl Usage: ELM_QUICKLAUNCH
7dnl add -pie -rdynamic to LDFLAGS and -fpie to CFLAGS
8
9AC_DEFUN([ELM_QUICKLAUNCH],
10[
11AC_MSG_CHECKING([If the compiler as what it takes to do quicklaunch (-pie -rdynamic)])
12old_LDFLAGS="$LDFLAGS"
13old_CFLAGS="$CFLAGS"
14
15LDFLAGS="$LDFLAGS -pie -rdynamic"
16CFLAGS="$CFLAGS -fpie"
17
18AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])],
19 [AC_MSG_RESULT([yes])],
20 [LDFLAGS="$old_LDFLAGS"
21 CFLAGS="$old_CFLAGS"
22 AC_MSG_RESULT([no])
23 ])
24])