summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-12-01 16:37:21 +0000
committerJérémy Zurcher <jeremy@asynk.ch>2013-12-01 16:45:48 +0000
commita3581f82344a9c2c78cb6ecabc317508ad06d59c (patch)
tree8f6d3ff2cfde27aa4ec35da602c18996e4f14210
parent73604955aa5b9f3f10a8d91d2c54d9907940f202 (diff)
add lib skeleton
-rw-r--r--lib/AUTHORS1
-rw-r--r--lib/COPYING26
-rw-r--r--lib/ChangeLog3
-rw-r--r--lib/INSTALL370
-rw-r--r--lib/Makefile.am79
-rw-r--r--lib/NEWS3
-rw-r--r--lib/README36
-rwxr-xr-xlib/autogen.sh15
-rw-r--r--lib/configure.ac262
-rw-r--r--lib/m4/efl_attribute.m483
-rw-r--r--lib/m4/efl_binary.m471
-rw-r--r--lib/m4/efl_compiler.m490
-rw-r--r--lib/m4/efl_path_max.m436
-rw-r--r--lib/m4/elm_quicklaunch.m424
-rw-r--r--lib/m4/project_init.m4115
-rw-r--r--lib/my_lib.pc.in12
-rw-r--r--lib/src/Makefile.am30
-rw-r--r--lib/src/Makefile_lib.am32
-rw-r--r--lib/src/lib/.deps/.dirstamp0
-rw-r--r--lib/src/lib/.deps/lib_libmy_lib_la-lib.Plo447
-rw-r--r--lib/src/lib/.dirstamp0
-rw-r--r--lib/src/lib/My_Lib.h43
-rw-r--r--lib/src/lib/my_lib.c72
-rw-r--r--lib/src/lib/my_lib_private.h33
-rw-r--r--lib/src/tests/my_lib_suite.c43
25 files changed, 1926 insertions, 0 deletions
diff --git a/lib/AUTHORS b/lib/AUTHORS
new file mode 100644
index 0000000..c8258c0
--- /dev/null
+++ b/lib/AUTHORS
@@ -0,0 +1 @@
Jérémy Zurcher <jeremy@asynk.ch>
diff --git a/lib/COPYING b/lib/COPYING
new file mode 100644
index 0000000..f69dd84
--- /dev/null
+++ b/lib/COPYING
@@ -0,0 +1,26 @@
1Copyright notice for my_lib:
2
3Copyright (C) 2013 Jérémy Zurcher <jeremy@asynk.ch>
4 and various contributors (see AUTHORS).
5
6All rights reserved.
7
8Redistribution and use in source and binary forms, with or without
9modification, are permitted provided that the following conditions are met:
10
11 1. Redistributions of source code must retain the above copyright
12 notice, this list of conditions and the following disclaimer.
13 2. Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
16
17THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
18INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
19FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
20COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
21INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
23OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/lib/ChangeLog b/lib/ChangeLog
new file mode 100644
index 0000000..dd3b0c4
--- /dev/null
+++ b/lib/ChangeLog
@@ -0,0 +1,3 @@
12013-04-01 Jérémy Zurcher (jeyzu)
2
3 * Initial commit
diff --git a/lib/INSTALL b/lib/INSTALL
new file mode 100644
index 0000000..6e90e07
--- /dev/null
+++ b/lib/INSTALL
@@ -0,0 +1,370 @@
1Installation Instructions
2*************************
3
4Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
5Inc.
6
7 Copying and distribution of this file, with or without modification,
8are permitted in any medium without royalty provided the copyright
9notice and this notice are preserved. This file is offered as-is,
10without warranty of any kind.
11
12Basic Installation
13==================
14
15 Briefly, the shell commands `./configure; make; make install' should
16configure, build, and install this package. The following
17more-detailed instructions are generic; see the `README' file for
18instructions specific to this package. Some packages provide this
19`INSTALL' file but do not implement all of the features documented
20below. The lack of an optional feature in a given package is not
21necessarily a bug. More recommendations for GNU packages can be found
22in *note Makefile Conventions: (standards)Makefile Conventions.
23
24 The `configure' shell script attempts to guess correct values for
25various system-dependent variables used during compilation. It uses
26those values to create a `Makefile' in each directory of the package.
27It may also create one or more `.h' files containing system-dependent
28definitions. Finally, it creates a shell script `config.status' that
29you can run in the future to recreate the current configuration, and a
30file `config.log' containing compiler output (useful mainly for
31debugging `configure').
32
33 It can also use an optional file (typically called `config.cache'
34and enabled with `--cache-file=config.cache' or simply `-C') that saves
35the results of its tests to speed up reconfiguring. Caching is
36disabled by default to prevent problems with accidental use of stale
37cache files.
38
39 If you need to do unusual things to compile the package, please try
40to figure out how `configure' could check whether to do them, and mail
41diffs or instructions to the address given in the `README' so they can
42be considered for the next release. If you are using the cache, and at
43some point `config.cache' contains results you don't want to keep, you
44may remove or edit it.
45
46 The file `configure.ac' (or `configure.in') is used to create
47`configure' by a program called `autoconf'. You need `configure.ac' if
48you want to change it or regenerate `configure' using a newer version
49of `autoconf'.
50
51 The simplest way to compile this package is:
52
53 1. `cd' to the directory containing the package's source code and type
54 `./configure' to configure the package for your system.
55
56 Running `configure' might take a while. While running, it prints
57 some messages telling which features it is checking for.
58
59 2. Type `make' to compile the package.
60
61 3. Optionally, type `make check' to run any self-tests that come with
62 the package, generally using the just-built uninstalled binaries.
63
64 4. Type `make install' to install the programs and any data files and
65 documentation. When installing into a prefix owned by root, it is
66 recommended that the package be configured and built as a regular
67 user, and only the `make install' phase executed with root
68 privileges.
69
70 5. Optionally, type `make installcheck' to repeat any self-tests, but
71 this time using the binaries in their final installed location.
72 This target does not install anything. Running this target as a
73 regular user, particularly if the prior `make install' required
74 root privileges, verifies that the installation completed
75 correctly.
76
77 6. You can remove the program binaries and object files from the
78 source code directory by typing `make clean'. To also remove the
79 files that `configure' created (so you can compile the package for
80 a different kind of computer), type `make distclean'. There is
81 also a `make maintainer-clean' target, but that is intended mainly
82 for the package's developers. If you use it, you may have to get
83 all sorts of other programs in order to regenerate files that came
84 with the distribution.
85
86 7. Often, you can also type `make uninstall' to remove the installed
87 files again. In practice, not all packages have tested that
88 uninstallation works correctly, even though it is required by the
89 GNU Coding Standards.
90
91 8. Some packages, particularly those that use Automake, provide `make
92 distcheck', which can by used by developers to test that all other
93 targets like `make install' and `make uninstall' work correctly.
94 This target is generally not run by end users.
95
96Compilers and Options
97=====================
98
99 Some systems require unusual options for compilation or linking that
100the `configure' script does not know about. Run `./configure --help'
101for details on some of the pertinent environment variables.
102
103 You can give `configure' initial values for configuration parameters
104by setting variables in the command line or in the environment. Here
105is an example:
106
107 ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108
109 *Note Defining Variables::, for more details.
110
111Compiling For Multiple Architectures
112====================================
113
114 You can compile the package for more than one kind of computer at the
115same time, by placing the object files for each architecture in their
116own directory. To do this, you can use GNU `make'. `cd' to the
117directory where you want the object files and executables to go and run
118the `configure' script. `configure' automatically checks for the
119source code in the directory that `configure' is in and in `..'. This
120is known as a "VPATH" build.
121
122 With a non-GNU `make', it is safer to compile the package for one
123architecture at a time in the source code directory. After you have
124installed the package for one architecture, use `make distclean' before
125reconfiguring for another architecture.
126
127 On MacOS X 10.5 and later systems, you can create libraries and
128executables that work on multiple system types--known as "fat" or
129"universal" binaries--by specifying multiple `-arch' options to the
130compiler but only a single `-arch' option to the preprocessor. Like
131this:
132
133 ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135 CPP="gcc -E" CXXCPP="g++ -E"
136
137 This is not guaranteed to produce working output in all cases, you
138may have to build one architecture at a time and combine the results
139using the `lipo' tool if you have problems.
140
141Installation Names
142==================
143
144 By default, `make install' installs the package's commands under
145`/usr/local/bin', include files under `/usr/local/include', etc. You
146can specify an installation prefix other than `/usr/local' by giving
147`configure' the option `--prefix=PREFIX', where PREFIX must be an
148absolute file name.
149
150 You can specify separate installation prefixes for
151architecture-specific files and architecture-independent files. If you
152pass the option `--exec-prefix=PREFIX' to `configure', the package uses
153PREFIX as the prefix for installing programs and libraries.
154Documentation and other data files still use the regular prefix.
155
156 In addition, if you use an unusual directory layout you can give
157options like `--bindir=DIR' to specify different values for particular
158kinds of files. Run `configure --help' for a list of the directories
159you can set and what kinds of files go in them. In general, the
160default for these options is expressed in terms of `${prefix}', so that
161specifying just `--prefix' will affect all of the other directory
162specifications that were not explicitly provided.
163
164 The most portable way to affect installation locations is to pass the
165correct locations to `configure'; however, many packages provide one or
166both of the following shortcuts of passing variable assignments to the
167`make install' command line to change installation locations without
168having to reconfigure or recompile.
169
170 The first method involves providing an override variable for each
171affected directory. For example, `make install
172prefix=/alternate/directory' will choose an alternate location for all
173directory configuration variables that were expressed in terms of
174`${prefix}'. Any directories that were specified during `configure',
175but not in terms of `${prefix}', must each be overridden at install
176time for the entire installation to be relocated. The approach of
177makefile variable overrides for each directory variable is required by
178the GNU Coding Standards, and ideally causes no recompilation.
179However, some platforms have known limitations with the semantics of
180shared libraries that end up requiring recompilation when using this
181method, particularly noticeable in packages that use GNU Libtool.
182
183 The second method involves providing the `DESTDIR' variable. For
184example, `make install DESTDIR=/alternate/directory' will prepend
185`/alternate/directory' before all installation names. The approach of
186`DESTDIR' overrides is not required by the GNU Coding Standards, and
187does not work on platforms that have drive letters. On the other hand,
188it does better at avoiding recompilation issues, and works well even
189when some directory options were not specified in terms of `${prefix}'
190at `configure' time.
191
192Optional Features
193=================
194
195 If the package supports it, you can cause programs to be installed
196with an extra prefix or suffix on their names by giving `configure' the
197option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198
199 Some packages pay attention to `--enable-FEATURE' options to
200`configure', where FEATURE indicates an optional part of the package.
201They may also pay attention to `--with-PACKAGE' options, where PACKAGE
202is something like `gnu-as' or `x' (for the X Window System). The
203`README' should mention any `--enable-' and `--with-' options that the
204package recognizes.
205
206 For packages that use the X Window System, `configure' can usually
207find the X include and library files automatically, but if it doesn't,
208you can use the `configure' options `--x-includes=DIR' and
209`--x-libraries=DIR' to specify their locations.
210
211 Some packages offer the ability to configure how verbose the
212execution of `make' will be. For these packages, running `./configure
213--enable-silent-rules' sets the default to minimal output, which can be
214overridden with `make V=1'; while running `./configure
215--disable-silent-rules' sets the default to verbose, which can be
216overridden with `make V=0'.
217
218Particular systems
219==================
220
221 On HP-UX, the default C compiler is not ANSI C compatible. If GNU
222CC is not installed, it is recommended to use the following options in
223order to use an ANSI C compiler:
224
225 ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226
227and if that doesn't work, install pre-built binaries of GCC for HP-UX.
228
229 HP-UX `make' updates targets which have the same time stamps as
230their prerequisites, which makes it generally unusable when shipped
231generated files such as `configure' are involved. Use GNU `make'
232instead.
233
234 On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235parse its `<wchar.h>' header file. The option `-nodtk' can be used as
236a workaround. If GNU CC is not installed, it is therefore recommended
237to try
238
239 ./configure CC="cc"
240
241and if that doesn't work, try
242
243 ./configure CC="cc -nodtk"
244
245 On Solaris, don't put `/usr/ucb' early in your `PATH'. This
246directory contains several dysfunctional programs; working variants of
247these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
248in your `PATH', put it _after_ `/usr/bin'.
249
250 On Haiku, software installed for all users goes in `/boot/common',
251not `/usr/local'. It is recommended to use the following options:
252
253 ./configure --prefix=/boot/common
254
255Specifying the System Type
256==========================
257
258 There may be some features `configure' cannot figure out
259automatically, but needs to determine by the type of machine the package
260will run on. Usually, assuming the package is built to be run on the
261_same_ architectures, `configure' can figure that out, but if it prints
262a message saying it cannot guess the machine type, give it the
263`--build=TYPE' option. TYPE can either be a short name for the system
264type, such as `sun4', or a canonical name which has the form:
265
266 CPU-COMPANY-SYSTEM
267
268where SYSTEM can have one of these forms:
269
270 OS
271 KERNEL-OS
272
273 See the file `config.sub' for the possible values of each field. If
274`config.sub' isn't included in this package, then this package doesn't
275need to know the machine type.
276
277 If you are _building_ compiler tools for cross-compiling, you should
278use the option `--target=TYPE' to select the type of system they will
279produce code for.
280
281 If you want to _use_ a cross compiler, that generates code for a
282platform different from the build platform, you should specify the
283"host" platform (i.e., that on which the generated programs will
284eventually be run) with `--host=TYPE'.
285
286Sharing Defaults
287================
288
289 If you want to set default values for `configure' scripts to share,
290you can create a site shell script called `config.site' that gives
291default values for variables like `CC', `cache_file', and `prefix'.
292`configure' looks for `PREFIX/share/config.site' if it exists, then
293`PREFIX/etc/config.site' if it exists. Or, you can set the
294`CONFIG_SITE' environment variable to the location of the site script.
295A warning: not all `configure' scripts look for a site script.
296
297Defining Variables
298==================
299
300 Variables not defined in a site shell script can be set in the
301environment passed to `configure'. However, some packages may run
302configure again during the build, and the customized values of these
303variables may be lost. In order to avoid this problem, you should set
304them in the `configure' command line, using `VAR=value'. For example:
305
306 ./configure CC=/usr/local2/bin/gcc
307
308causes the specified `gcc' to be used as the C compiler (unless it is
309overridden in the site shell script).
310
311Unfortunately, this technique does not work for `CONFIG_SHELL' due to
312an Autoconf limitation. Until the limitation is lifted, you can use
313this workaround:
314
315 CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
316
317`configure' Invocation
318======================
319
320 `configure' recognizes the following options to control how it
321operates.
322
323`--help'
324`-h'
325 Print a summary of all of the options to `configure', and exit.
326
327`--help=short'
328`--help=recursive'
329 Print a summary of the options unique to this package's
330 `configure', and exit. The `short' variant lists options used
331 only in the top level, while the `recursive' variant lists options
332 also present in any nested packages.
333
334`--version'
335`-V'
336 Print the version of Autoconf used to generate the `configure'
337 script, and exit.
338
339`--cache-file=FILE'
340 Enable the cache: use and save the results of the tests in FILE,
341 traditionally `config.cache'. FILE defaults to `/dev/null' to
342 disable caching.
343
344`--config-cache'
345`-C'
346 Alias for `--cache-file=config.cache'.
347
348`--quiet'
349`--silent'
350`-q'
351 Do not print messages saying which checks are being made. To
352 suppress all normal output, redirect it to `/dev/null' (any error
353 messages will still be shown).
354
355`--srcdir=DIR'
356 Look for the package's source code in directory DIR. Usually
357 `configure' can determine that directory automatically.
358
359`--prefix=DIR'
360 Use DIR as the installation prefix. *note Installation Names::
361 for more details, including other options available for fine-tuning
362 the installation locations.
363
364`--no-create'
365`-n'
366 Run the configure checks, but stop before creating any output
367 files.
368
369`configure' also accepts some other, not widely useful, options. Run
370`configure --help' for more details.
diff --git a/lib/Makefile.am b/lib/Makefile.am
new file mode 100644
index 0000000..889fd69
--- /dev/null
+++ b/lib/Makefile.am
@@ -0,0 +1,79 @@
1ACLOCAL_AMFLAGS = -I m4
2AM_MAKEFLAGS = --no-print-directory
3AM_DISTCHECK_CONFIGURE_FLAGS = \
4 --with-tests=regular
5
6SUBDIRS = src
7
8MAINTAINERCLEANFILES = \
9 Makefile.in \
10 $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
11 $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \
12 aclocal.m4 \
13 config.guess \
14 config.cache-env \
15 config.h.in \
16 config.sub \
17 configure \
18 compile \
19 depcomp \
20 install-sh \
21 ltconfig \
22 ltmain.sh \
23 missing \
24 mkinstalldirs \
25 stamp-h.in \
26 stamp-h \
27 m4/libtool.m4 \
28 m4/lt~obsolete.m4 \
29 m4/ltoptions.m4 \
30 m4/ltsugar.m4 \
31 m4/ltversion.m4
32
33EXTRA_DIST = \
34 README \
35 AUTHORS \
36 COPYING \
37 autogen.sh \
38 my_lib.pc.in \
39 m4/efl_attribute.m4 \
40 m4/efl_compiler.m4 \
41 m4/efl_path_max.m4 \
42 m4/efl_binary.m4 \
43 m4/project_init.m4
44
45pkgconfigdir = $(libdir)/pkgconfig
46pkgconfig_DATA = my_lib.pc
47
48
49# Unit tests
50
51if MY_LIB_ENABLE_COVERAGE
52
53lcov-reset:
54 @rm -rf $(top_builddir)/coverage
55 @find $(top_builddir) -name "*.gcda" -delete
56 @lcov --zerocounters --directory $(top_builddir)
57
58lcov-report:
59 @mkdir $(top_builddir)/coverage
60 lcov --capture --compat-libtool --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir) --base-directory $(top_srcdir)/src/
61 lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info
62 lcov --remove $(top_builddir)/coverage/coverage.cleaned.info '*/tests/*' --output-file $(top_builddir)/coverage/coverage.cleaned2.info
63 genhtml --branch-coverage -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned2.info
64 @echo "Coverage Report at $(top_builddir)/coverage/html"
65
66endif
67
68if MY_LIB_ENABLE_TESTS
69
70lcov-check:
71if MY_LIB_ENABLE_COVERAGE
72 @$(MAKE) $(AM_MAKEFLAGS) lcov-reset
73endif
74 @$(MAKE) $(AM_MAKEFLAGS) check
75if MY_LIB_ENABLE_COVERAGE
76 @$(MAKE) $(AM_MAKEFLAGS) lcov-report
77endif
78
79endif
diff --git a/lib/NEWS b/lib/NEWS
new file mode 100644
index 0000000..e60b21c
--- /dev/null
+++ b/lib/NEWS
@@ -0,0 +1,3 @@
1my_lib 0.0.1
2
3 * Initial version
diff --git a/lib/README b/lib/README
new file mode 100644
index 0000000..f296285
--- /dev/null
+++ b/lib/README
@@ -0,0 +1,36 @@
1my_lib 0.0.1
2
3******************************************************************************
4
5 FOR ANY ISSUES PLEASE EMAIL:
6 jeremy@asynk.ch
7
8******************************************************************************
9
10Requirements:
11-------------
12
13Must:
14 libc
15 efl 1.7
16 elementary 1.7
17
18------------------------------------------------------------------------------
19
20COMPILING AND INSTALLING:
21
22 $ ./configure
23 $ make
24(as root unless you are installing in your users directories):
25 $ make install
26
27----
28
29DOCS
30
31To generate documentation, doxygen is required.
32
33 $ make doc
34
35will create a etrophy/doc/html directory.
36You could start looking at index.html.
diff --git a/lib/autogen.sh b/lib/autogen.sh
new file mode 100755
index 0000000..fe644eb
--- /dev/null
+++ b/lib/autogen.sh
@@ -0,0 +1,15 @@
1#!/bin/sh
2
3rm -rf autom4te.cache
4rm -f aclocal.m4 ltmain.sh
5
6echo "Running autopoint..." ; autopoint -f || :
7echo "Running aclocal..." ; aclocal -I m4 $ACLOCAL_FLAGS || exit 1
8echo "Running autoconf..." ; autoconf || exit 1
9echo "Running autoheader..." ; autoheader || exit 1
10echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
11echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
12
13if [ -z "$NOCONFIGURE" ]; then
14 ./configure "$@"
15fi
diff --git a/lib/configure.ac b/lib/configure.ac
new file mode 100644
index 0000000..80de95c
--- /dev/null
+++ b/lib/configure.ac
@@ -0,0 +1,262 @@
1dnl Process this file with autoconf to produce a configure script.
2
3# get rid of that stupid cache mechanism
4rm -f config.cache
5
6PROJECT_VERSION([0], [0], [1], [dev])
7AC_INIT([my_lib], [v_ver], [jeremy@asynk.ch])
8AC_PREREQ([2.65])
9AC_CONFIG_SRCDIR([configure.ac])
10AC_CONFIG_MACRO_DIR([m4])
11
12AC_CONFIG_HEADERS([config.h])
13AH_TOP([
14#ifndef __CONFIG_H__
15#define __CONFIG_H__
16])
17AH_BOTTOM([
18#endif /* __CONFIG_H__ */
19])
20
21AM_INIT_AUTOMAKE([1.10 dist-bzip2])
22m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
23
24# this will speed up libtool checks
25LT_PREREQ([2.2])
26LT_INIT([win32-dll])
27PROJECT_INIT
28
29### Default options with respect to host
30
31AC_CANONICAL_BUILD
32AC_CANONICAL_HOST
33
34### Additional options to configure
35
36# Build profile
37
38AC_ARG_WITH([profile],
39 [AC_HELP_STRING([--with-profile=PROFILE],
40 [use the predefined build profile, one of: dev, debug and release.
41 @<:@default=dev@:>@])],
42 [build_profile=${withval}],
43 [build_profile=def_build_profile])
44
45case "${build_profile}" in
46 dev|debug|release)
47 ;;
48 *)
49 AC_MSG_ERROR([Unknown build profile --with-profile=${build_profile}])
50 ;;
51esac
52
53# Tests
54
55AC_ARG_WITH([tests],
56 [AC_HELP_STRING([--with-tests=none|regular|coverage],
57 [choose testing method: regular, coverage or none.
58 @<:@default=none@:>@])],
59 [build_tests=${withval}],
60 [build_tests=auto])
61
62want_coverage="no"
63want_tests="no"
64case "${build_tests}" in
65 auto)
66 if test "${build_profile}" = "dev"; then
67 want_tests="yes"
68 fi
69 ;;
70 regular)
71 want_tests="yes"
72 ;;
73 coverage)
74 want_tests="yes"
75 want_coverage="yes"
76 ;;
77 none)
78 ;;
79 *)
80 AC_MSG_ERROR([Unknown build tests option: --with-tests=${build_tests}])
81 ;;
82esac
83
84### Checks for programs
85
86AC_PROG_CC
87
88# Check edje_cc
89EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
90if test "x${edje_cc}" = "x" ; then
91 AC_MSG_ERROR([Unable to find edje_cc binary.])
92fi
93
94# pkg-config
95
96PKG_PROG_PKG_CONFIG
97
98# Check whether pkg-config supports Requires.private
99
100if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
101 pkgconfig_requires_private="Requires.private"
102else
103 pkgconfig_requires_private="Requires"
104fi
105AC_SUBST(pkgconfig_requires_private)
106
107# lcov
108
109if test "${want_coverage}" = "yes" ; then
110 AC_CHECK_PROG([have_lcov], [lcov], [yes], [no])
111 if test "x${have_lcov}" = "xyes" ; then
112 MY_LIB_COV_CFLAGS="${MY_LIB_COV_CFLAGS} -fprofile-arcs -ftest-coverage"
113 MY_LIB_COV_LIBS="${MY_LIB_COV_LIBS} -lgcov"
114 if test "x${prefer_assert}" = "xno"; then
115 MY_LIB_COV_CFLAGS="${MY_LIB_COV_CFLAGS} -DNDEBUG"
116 else
117 MY_LIB_COV_CFLAGS="${MY_LIB_COV_CFLAGS} -g -O0 -DDEBUG"
118 fi
119 else
120 AC_MSG_ERROR([lcov is not found])
121 fi
122fi
123
124AC_SUBST(MY_LIB_COV_LIBS)
125AC_SUBST(MY_LIB_COV_CFLAGS)
126AM_CONDITIONAL([MY_LIB_ENABLE_COVERAGE], [test "${want_coverage}" = "yes"])
127
128### Checks for libraries
129
130# check unit testing library
131
132if test "${want_tests}" = "yes"; then
133 PKG_CHECK_MODULES([CHECK], [check >= 0.9.5])
134fi
135AM_CONDITIONAL([MY_LIB_ENABLE_TESTS], [test "${want_tests}" = "yes"])
136
137# Checks for library functions.
138
139# Evil library for compilation on Windows
140
141MY_LIB_BUILD=""
142case "$host_os" in
143 mingw*)
144 PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0])
145 AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if Evil library is installed])
146 requirement_my_lib="evil ${requirement_my_lib}"
147 MY_LIB_BUILD="-DMY_LIB_BUILD"
148 ;;
149esac
150AC_SUBST(MY_LIB_BUILD)
151
152# Dependencies for the library
153
154requirement_my_lib="elementary >= 1.7.0 evas >= 1.7.0 ecore-file >= 1.7.0 ecore >= 1.7.0 eet >= 1.7.0 eina >= 1.7.0 ${requirement_my_lib}"
155PKG_CHECK_MODULES([EFL], [ $requirement_my_lib ])
156
157AC_SUBST(requirement_my_lib)
158
159# Checks for library functions.
160
161AM_GNU_GETTEXT_VERSION([0.18])
162
163### Checks for header files
164
165EFL_CHECK_PATH_MAX
166
167### Checks for types
168
169### Checks for structures
170
171### Checks for compiler characteristics
172
173AM_PROG_CC_C_O
174AC_C_CONST
175AC_PROG_CC_STDC
176AC_HEADER_STDC
177
178ELM_QUICKLAUNCH
179EFL_ATTRIBUTE_VECTOR
180
181case "$host_os" in
182 mingw32ce*)
183 MY_LIB_CFLAGS="${MY_LIB_CFLAGS} -D_WIN32_WCE=0x0420"
184 ;;
185esac
186
187EFL_CHECK_COMPILER_FLAGS([MY_LIB], [-Wall -Wunused -Wextra -Wpointer-arith -Wno-missing-field-initializers -fvisibility=hidden -fdata-sections -ffunction-sections])
188EFL_CHECK_LINKER_FLAGS([MY_LIB], [-fvisibility=hidden -fdata-sections -ffunction-sections -Wl,--gc-sections -fno-strict-aliasing -Wl,--as-needed -Wl,--no-copy-dt-needed-entries])
189
190case "${build_profile}" in
191 dev)
192 dnl Check if compiler has a dodgy -Wshadow that emits errors when shadowing a global
193 AC_MSG_CHECKING([whether -Wshadow generates spurious warnings])
194 CFLAGS_save="${CFLAGS}"
195 CFLAGS="${CFLAGS} -Werror -Wshadow"
196 AC_TRY_COMPILE([int x;], [int x = 0; (void)x;],
197 [AC_MSG_RESULT([no])
198 EFL_CHECK_COMPILER_FLAGS([EFL], [-Wshadow])],
199 [AC_MSG_RESULT([yes])])
200 CFLAGS="${CFLAGS_save}"
201 ;;
202
203 debug)
204 ;;
205
206 release)
207 ;;
208esac
209
210# CPU architecture specific assembly
211
212### Checks for linker characteristics
213
214lt_enable_auto_import=""
215case "$host_os" in
216 mingw*)
217 lt_enable_auto_import="-Wl,--enable-auto-import"
218 ;;
219esac
220AC_SUBST(lt_enable_auto_import)
221
222### Output
223
224AC_OUTPUT([
225 my_lib.pc
226 Makefile
227 src/Makefile
228])
229
230AC_OUTPUT
231
232#####################################################################
233## Info
234
235echo
236echo
237echo
238echo "------------------------------------------------------------------------"
239echo "$PACKAGE $VERSION"
240echo "------------------------------------------------------------------------"
241echo
242echo "Compilation................: make (or gmake)"
243echo " CPPFLAGS.................: $CPPFLAGS"
244echo " CFLAGS...................: $CFLAGS"
245echo " LDFLAGS..................: $LDFLAGS"
246echo
247echo "Installation...............: make install (as root if needed, with 'su' or 'sudo')"
248echo " prefix...................: $prefix"
249echo " edje_cc..................: ${edje_cc}"
250echo
251echo "Configuration...: ${COLOR_OTHER}profile=${build_profile} os=${host_os}${COLOR_RESET}"
252echo
253if test "${want_coverage}" = "yes"; then
254echo "Tests...........: make lcov-check"
255else
256if test "${want_tests}" = "yes"; then
257echo "Tests...........: make check"
258else
259echo "Tests...........: no"
260fi
261fi
262echo
diff --git a/lib/m4/efl_attribute.m4 b/lib/m4/efl_attribute.m4
new file mode 100644
index 0000000..4f31d93
--- /dev/null
+++ b/lib/m4/efl_attribute.m4
@@ -0,0 +1,83 @@
1dnl Copyright (C) 2011 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macros for checking if the compiler supports some __attribute__ uses
5
6dnl Usage: EFL_ATTRIBUTE_VECTOR
7dnl call AC_DEFINE for HAVE_GCC_ATTRIBUTE_VECTOR if __attribute__((vector)) is available
8
9AC_DEFUN([EFL_ATTRIBUTE_VECTOR],
10[
11AC_MSG_CHECKING([for __attribute__ ((vector))])
12AC_COMPILE_IFELSE(
13 [AC_LANG_PROGRAM(
14 [[
15typedef int v4si __attribute__ ((vector_size (16)));
16 ]],
17 [[
18if (sizeof(v4si) == 16)
19 return 0;
20else
21 return -1;
22 ]])],
23 [have_attribute_vector="yes"],
24 [have_attribute_vector="no"])
25AC_MSG_RESULT([${have_attribute_vector}])
26
27if test "x${have_attribute_vector}" = "xyes" ; then
28 AC_DEFINE([HAVE_GCC_ATTRIBUTE_VECTOR], [1], [Define to 1 if your compiler supports __attribute__ ((vector)).])
29fi
30])
31
32dnl Usage: EFL_ATTRIBUTE_ALWAYS_INLINE
33dnl call AC_DEFINE for alway_inline if __attribute__((always_inline)) is available
34
35AC_DEFUN([EFL_ATTRIBUTE_ALWAYS_INLINE],
36[
37
38have_attribute_forceinline="no"
39
40AC_MSG_CHECKING([for __forceinline])
41
42AC_COMPILE_IFELSE(
43 [AC_LANG_PROGRAM(
44 [[
45#include <windows.h>
46static __forceinline void foo(void) {}
47 ]],
48 [[
49 ]])],
50 [
51 have_attribute_always_inline="yes"
52 have_attribute_forceinline="yes"
53 ],
54 [have_attribute_always_inline="no"])
55
56AC_MSG_RESULT([${have_attribute_always_inline}])
57
58if test "x${have_attribute_always_inline}" = "xno" ; then
59 AC_MSG_CHECKING([for __attribute__ ((__always_inline__))])
60 AC_COMPILE_IFELSE(
61 [AC_LANG_PROGRAM(
62 [[
63static __attribute__((__always_inline__)) inline void foo(void) {}
64 ]],
65 [[
66 ]])],
67 [have_attribute_always_inline="yes"],
68 [have_attribute_always_inline="no"])
69 AC_MSG_RESULT([${have_attribute_always_inline}])
70fi
71
72if test "x${have_attribute_always_inline}" = "xyes" ; then
73 if test "x${have_attribute_forceinline}" = "xyes" ; then
74 AC_DEFINE([EFL_ALWAYS_INLINE], [__forceinline], [Macro declaring a function to always be inlined.])
75 else
76 AC_DEFINE([EFL_ALWAYS_INLINE], [__attribute__ ((__always_inline__)) inline], [Macro declaring a function to always be inlined.])
77 fi
78else
79 AC_DEFINE([EFL_ALWAYS_INLINE], [static inline], [Macro declaring a function to always be inlined.])
80fi
81])
82
83dnl End of efl_attribute.m4
diff --git a/lib/m4/efl_binary.m4 b/lib/m4/efl_binary.m4
new file mode 100644
index 0000000..c774688
--- /dev/null
+++ b/lib/m4/efl_binary.m4
@@ -0,0 +1,71 @@
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 check if a binary is built or not
5
6dnl Usage: EFL_ENABLE_BIN(binary)
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
17have_[]m4_defn([DOWN])="yes"
18
19dnl configure option
20
21AC_ARG_ENABLE([$1],
22 [AC_HELP_STRING([--disable-$1], [disable building of ]DOWN)],
23 [
24 if test "x${enableval}" = "xyes" ; then
25 have_[]m4_defn([DOWN])="yes"
26 else
27 have_[]m4_defn([DOWN])="no"
28 fi
29 ])
30
31AC_MSG_CHECKING([whether to build ]DOWN[ binary])
32AC_MSG_RESULT([$have_[]m4_defn([DOWN])])
33
34if test "x$have_[]m4_defn([DOWN])" = "xyes"; then
35 UP[]_PRG=DOWN[${EXEEXT}]
36fi
37
38AC_SUBST(UP[]_PRG)
39
40AM_CONDITIONAL(BUILD_[]UP, test "x$have_[]m4_defn([DOWN])" = "xyes")
41
42AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$2], [$3])
43
44])
45
46
47dnl Macro that check if a binary is built or not
48
49dnl Usage: EFL_WITH_BIN(package, binary, default_value)
50dnl Call AC_SUBST(_binary) (_binary is the lowercase of binary, - being transformed into _ by default, or the value set by the user)
51
52AC_DEFUN([EFL_WITH_BIN],
53[
54
55m4_pushdef([DOWN], m4_translit([[$2]], [-A-Z], [_a-z]))dnl
56
57dnl configure option
58
59AC_ARG_WITH([$2],
60 [AC_HELP_STRING([--with-$2=PATH], [specify a specific path to ]DOWN[ @<:@default=$3@:>@])],
61 [_efl_with_binary=${withval}],
62 [_efl_with_binary=$(pkg-config --variable=prefix $1)/bin/$3])
63
64DOWN=${_efl_with_binary}
65AC_MSG_NOTICE(DOWN[ set to ${_efl_with_binary}])
66
67with_binary_[]m4_defn([DOWN])=${_efl_with_binary}
68
69AC_SUBST(DOWN)
70
71])
diff --git a/lib/m4/efl_compiler.m4 b/lib/m4/efl_compiler.m4
new file mode 100644
index 0000000..32819f2
--- /dev/null
+++ b/lib/m4/efl_compiler.m4
@@ -0,0 +1,90 @@
1dnl Copyright (C) 2012 Vincent Torri <vincent dot torri at gmail dot com>
2dnl This code is public domain and can be freely used or copied.
3
4dnl Macro that check if compiler of linker flags are available
5
6
7dnl Macro that checks for a compiler flag availability
8dnl
9dnl _EFL_CHECK_COMPILER_FLAGS(EFL, FLAGS)
10dnl AC_SUBST : EFL_CFLAGS (EFL being replaced by its value)
11dnl have_flag: yes or no.
12AC_DEFUN([_EFL_CHECK_COMPILER_FLAGS],
13[dnl
14m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
15
16dnl store in options -Wfoo if -Wno-foo is passed
17option="m4_bpatsubst([[$2]], [-Wno-], [-W])"
18CFLAGS_save="${CFLAGS}"
19CFLAGS="${CFLAGS} ${option}"
20AC_LANG_PUSH([C])
21
22AC_MSG_CHECKING([whether the compiler supports $2])
23AC_COMPILE_IFELSE(
24 [AC_LANG_PROGRAM([[]])],
25 [have_flag="yes"],
26 [have_flag="no"])
27AC_MSG_RESULT([${have_flag}])
28
29AC_LANG_POP([C])
30CFLAGS="${CFLAGS_save}"
31if test "x${have_flag}" = "xyes" ; then
32 UPEFL[_CFLAGS]="${UPEFL[_CFLAGS]} [$2]"
33fi
34AC_SUBST(UPEFL[_CFLAGS])dnl
35m4_popdef([UPEFL])dnl
36])
37
38dnl EFL_CHECK_COMPILER_FLAGS(EFL, FLAGS)
39dnl Checks if FLAGS are supported and add to EFL_CLFAGS.
40dnl
41dnl It will first try every flag at once, if one fails will try them one by one.
42AC_DEFUN([EFL_CHECK_COMPILER_FLAGS],
43[dnl
44_EFL_CHECK_COMPILER_FLAGS([$1], [$2])
45if test "${have_flag}" != "yes"; then
46m4_foreach_w([flag], [$2], [_EFL_CHECK_COMPILER_FLAGS([$1], m4_defn([flag]))])
47fi
48])
49
50
51dnl Macro that checks for a linker flag availability
52dnl
53dnl _EFL_CHECK_LINKER_FLAGS(EFL, FLAGS)
54dnl AC_SUBST : EFL_LDFLAGS (EFL being replaced by its value)
55dnl have_flag: yes or no
56AC_DEFUN([_EFL_CHECK_LINKER_FLAGS],
57[dnl
58m4_pushdef([UPEFL], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
59
60LDFLAGS_save="${LDFLAGS}"
61LDFLAGS="${LDFLAGS} $2"
62AC_LANG_PUSH([C])
63
64AC_MSG_CHECKING([whether the linker supports $2])
65AC_LINK_IFELSE(
66 [AC_LANG_PROGRAM([[]])],
67 [have_flag="yes"],
68 [have_flag="no"])
69AC_MSG_RESULT([${have_flag}])
70
71AC_LANG_POP([C])
72LDFLAGS="${LDFLAGS_save}"
73if test "x${have_flag}" = "xyes" ; then
74 UPEFL[_LDFLAGS]="${UPEFL[_LDFLAGS]} [$2]"
75fi
76AC_SUBST(UPEFL[_LDFLAGS])dnl
77m4_popdef([UPEFL])dnl
78])
79
80dnl EFL_CHECK_LINKER_FLAGS(EFL, FLAGS)
81dnl Checks if FLAGS are supported and add to EFL_CLFAGS.
82dnl
83dnl It will first try every flag at once, if one fails will try them one by one.
84AC_DEFUN([EFL_CHECK_LINKER_FLAGS],
85[dnl
86_EFL_CHECK_LINKER_FLAGS([$1], [$2])
87if test "${have_flag}" != "yes"; then
88m4_foreach_w([flag], [$2], [_EFL_CHECK_LINKER_FLAGS([$1], m4_defn([flag]))])
89fi
90])dnl
diff --git a/lib/m4/efl_path_max.m4 b/lib/m4/efl_path_max.m4
new file mode 100644
index 0000000..f57bfd2
--- /dev/null
+++ b/lib/m4/efl_path_max.m4
@@ -0,0 +1,36 @@
1dnl Check for PATH_MAX in limits.h, and define a default value if not found
2dnl This is a workaround for systems not providing PATH_MAX, like GNU/Hurd
3
4dnl EFL_CHECK_PATH_MAX([DEFAULT_VALUE_IF_NOT_FOUND])
5dnl
6dnl If PATH_MAX is not defined in <limits.h>, defines it
7dnl to DEFAULT_VALUE_IF_NOT_FOUND if it exists, or fallback
8dnl to using 4096
9
10AC_DEFUN([EFL_CHECK_PATH_MAX],
11[
12
13default_max=m4_default([$1], "4096")
14AC_LANG_PUSH([C])
15
16AC_MSG_CHECKING([for PATH_MAX in limits.h])
17AC_COMPILE_IFELSE(
18 [AC_LANG_PROGRAM(
19 [[
20#include <limits.h>
21 ]],
22 [[
23int i = PATH_MAX;
24 ]])],
25 [AC_MSG_RESULT([yes])],
26 [
27 AC_DEFINE_UNQUOTED([PATH_MAX],
28 [${default_max}],
29 [default value since PATH_MAX is not defined])
30 AC_MSG_RESULT([no: using ${default_max}])
31 ])
32
33AC_LANG_POP([C])
34
35])
36dnl end of efl_path_max.m4
diff --git a/lib/m4/elm_quicklaunch.m4 b/lib/m4/elm_quicklaunch.m4
new file mode 100644
index 0000000..7d27788
--- /dev/null
+++ b/lib/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() { return 0; }])],
19 [AC_MSG_RESULT([yes])],
20 [LDFLAGS="$old_LDFLAGS"
21 CFLAGS="$old_CFLAGS"
22 AC_MSG_RESULT([no])
23 ])
24])
diff --git a/lib/m4/project_init.m4 b/lib/m4/project_init.m4
new file mode 100644
index 0000000..12645a8
--- /dev/null
+++ b/lib/m4/project_init.m4
@@ -0,0 +1,115 @@
1
2dnl PROJECT_VERSION(major, minor, micro, release)
3dnl This setup PROJECT version information and should be called BEFORE AC_INIT().
4dnl
5dnl release parameter is 'dev' to use from SVN or libtool -release field.
6dnl It may be empty if not dev (svn/live build) and no -release is to be used.
7dnl
8dnl Examples:
9dnl PROJECT_VERSION(1, 7, 99, dev)
10dnl PROJECT_VERSION(1, 7, 99, ver-1234)
11dnl This will define couple of m4 symbols:
12dnl v_maj = given major number (first parameter)
13dnl v_min = given minor number (second parameter)
14dnl v_mic = given micro number (third parameter)
15dnl v_rev = if release, it's 0, otherwise it's dev_version.
16dnl v_rel = if release, it's -release followed by fourth parameter,
17dnl otherwise it's empty. (mostly for libtool)
18dnl v_ver = if release, it's major.minor.micro, otherwise it's
19dnl major.minor.micro.dev_version
20dnl dev_version = development version (svn revision).
21dnl def_build_profile = dev or release based on 'dev' release parameter.
22AC_DEFUN([PROJECT_VERSION],
23[dnl
24m4_define([v_maj], [$1])dnl
25m4_define([v_min], [$2])dnl
26m4_define([v_mic], [$3])dnl
27m4_define([dev_version], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl
28m4_define([v_rev], m4_if($4, dev, [dev_version], [0]))dnl
29m4_define([v_rel], m4_if($4, dev, [], m4_ifblank($4, [], [-release $4])))dnl
30m4_define([def_build_profile], m4_if($4, dev, [dev], [release]))dnl
31m4_define([v_ver], m4_if($4, dev, [v_maj.v_min.v_mic.v_rev], [v_maj.v_min.v_mic]))dnl
32])
33
34dnl PROJECT_COLOR
35dnl will check if terminal supports color and if color is wanted by user.
36dnl
37dnl Used Variables:
38dnl WANT_COLOR: if no, forces no color output.
39dnl TERM: used to check if color should be enabled.
40dnl
41dnl Defined Variables:
42dnl COLOR_YES: to be used in positive/yes conditions
43dnl COLOR_NO: to be used in negative/no conditions
44dnl COLOR_OTHER: to be used to highlight some other condition
45dnl COLOR_RESET: to reset color
46dnl want_color: yes or no
47AC_DEFUN([PROJECT_COLOR],
48[dnl
49case "$TERM" in
50 xterm|xterm-color|Eterm|aterm|kterm|rxvt*|screen|gnome|interix)
51 want_color="${WANT_COLOR:-yes}"
52 ;;
53 *)
54 want_color="no"
55 ;;
56esac
57
58if test "${want_color}" = "yes"; then
59 COLOR_YES=`echo -e "\033@<:@1;32m"`
60 COLOR_NO=`echo -e "\033@<:@1;31m"`
61 COLOR_OTHER=`echo -e "\033@<:@1;36m"`
62 COLOR_RESET=`echo -e "\033@<:@0m"`
63else
64 COLOR_YES=""
65 COLOR_NO=""
66 COLOR_OTHER=""
67 COLOR_RESET=""
68fi
69])
70
71dnl PROJECT_INIT()
72dnl Will AC_DEFINE() the following:
73dnl VMAJ = v_maj
74dnl VMIN = v_min
75dnl VMIC = v_mic
76dnl VREV = v_rev
77dnl Will AC_SUBST() the following:
78dnl VMAJ = v_maj
79dnl VMIN = v_min
80dnl VMIC = v_mic
81dnl PROJECT_LTLIBRARY_FLAGS="-no-undefined -version-info ..."
82dnl PROJECT_LTMODULE_FLAGS="-no-undefined -avoid-version"
83dnl Will define the following m4:
84dnl lt_cur = libtool 'current' field of libtool's -version-info
85dnl lt_rev = libtool 'revision' field of libtool's -version-info
86dnl lt_age = libtool 'age' field of libtool's -version-info
87AC_DEFUN([PROJECT_INIT],
88[dnl
89AC_REQUIRE([PROJECT_COLOR])dnl
90AC_DEFINE_UNQUOTED([VMAJ], [v_maj], [Major version])dnl
91AC_DEFINE_UNQUOTED([VMIN], [v_min], [Minor version])dnl
92AC_DEFINE_UNQUOTED([VMIC], [v_mic], [Micro version])dnl
93AC_DEFINE_UNQUOTED([VREV], [v_rev], [Revison])dnl
94VMAJ=v_maj
95VMIN=v_min
96VMIC=v_mic
97AC_SUBST([VMAJ])dnl
98AC_SUBST([VMIN])dnl
99AC_SUBST([VMIC])dnl
100dnl
101dnl TODO: warning - lt_cur:
102dnl the previous code assumed v_maj + v_min, but this will be a problem when
103dnl we bump v_maj and reset v_min. 1 + 7 == 7 + 1, so if v_maj is bumped
104dnl we multiply it by 100.
105m4_define([lt_cur], m4_if(m4_cmp(v_maj, 1), 0, m4_eval(v_maj + v_min), m4_eval(v_maj * 100 + v_min)))dnl
106m4_define([lt_rev], v_mic)dnl
107m4_define([lt_age], v_min)dnl
108dnl
109PROJECT_LTLIBRARY_FLAGS="-no-undefined -version-info lt_cur:lt_rev:lt_age v_rel"
110AC_SUBST(PROJECT_LTLIBRARY_FLAGS)dnl
111PROJECT_LTMODULE_FLAGS="-no-undefined -avoid-version"
112AC_SUBST([PROJECT_LTMODULE_FLAGS])dnl
113AC_MSG_NOTICE([Initialized AC_PACKAGE_NAME (AC_PACKAGE_VERSION) development=dev_version v_rel])
114])
115
diff --git a/lib/my_lib.pc.in b/lib/my_lib.pc.in
new file mode 100644
index 0000000..0713b2e
--- /dev/null
+++ b/lib/my_lib.pc.in
@@ -0,0 +1,12 @@
1prefix=@prefix@
2exec_prefix=@exec_prefix@
3libdir=@libdir@
4includedir=@includedir@
5vmaj=@VMAJ@
6
7Name: my_lib
8Description: This is a source tree for any efl based library.
9@pkgconfig_requires_private@: @requirement_my_lib@
10Version: @VERSION@
11Libs: -L${libdir} -lmy_lib
12Cflags: -I${includedir}/my_lib-@VMAJ@
diff --git a/lib/src/Makefile.am b/lib/src/Makefile.am
new file mode 100644
index 0000000..b3d0651
--- /dev/null
+++ b/lib/src/Makefile.am
@@ -0,0 +1,30 @@
1AUTOMAKE_OPTIONS = subdir-objects
2
3MAINTAINERCLEANFILES = Makefile.in
4CLEANFILES =
5BUILT_SOURCES =
6
7DIST_SUBDIRS =
8SUBDIRS =
9
10lib_LTLIBRARIES =
11bin_PROGRAMS =
12bin_SCRIPTS =
13noinst_PROGRAMS =
14check_PROGRAMS =
15TESTS =
16EXTRA_DIST =
17
18MY_LIB_INSTALL_DATA_HOOK=
19
20AM_CPPFLAGS = -I. \
21 -I$(top_srcdir) \
22 -I$(top_srcdir)/src/lib \
23 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
24 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
25 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
26 @EFL_CFLAGS@ \
27 @MY_LIB_CFLAGS@ \
28 @MY_LIB_COV_CFLAGS@
29
30include Makefile_lib.am
diff --git a/lib/src/Makefile_lib.am b/lib/src/Makefile_lib.am
new file mode 100644
index 0000000..bfb9c39
--- /dev/null
+++ b/lib/src/Makefile_lib.am
@@ -0,0 +1,32 @@
1### Libraries
2
3includesdir = $(includedir)/my_lib-@VMAJ@
4includes_HEADERS = \
5 lib/My_Lib.h
6
7lib_libmy_lib_la_SOURCES = \
8 lib/my_lib.c
9
10EXTRA_DIST += lib/my_lib_private.h
11
12lib_LTLIBRARIES += lib/libmy_lib.la
13
14lib_libmy_lib_la_LIBADD = @EFL_LIBS@ @MY_LIB_COV_LIBS@
15lib_libmy_lib_la_CFLAGS =
16lib_libmy_lib_la_LDFLAGS = @MY_LIB_LDFLAGS@ @PROJECT_LTLIBRARY_FLAGS@
17
18### Unit tests
19
20if MY_LIB_ENABLE_TESTS
21
22TESTS += tests/my_lib_suite
23check_PROGRAMS += tests/my_lib_suite
24
25tests_my_lib_suite_SOURCES = \
26 tests/my_lib_suite.c
27
28tests_my_lib_suite_CFLAGS = @CHECK_CFLAGS@
29tests_my_lib_suite_LDADD = @CHECK_LIBS@ lib/libmy_lib.la
30tests_my_lib_suite_DEPENDENCIES =
31
32endif
diff --git a/lib/src/lib/.deps/.dirstamp b/lib/src/lib/.deps/.dirstamp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lib/src/lib/.deps/.dirstamp
diff --git a/lib/src/lib/.deps/lib_libmy_lib_la-lib.Plo b/lib/src/lib/.deps/lib_libmy_lib_la-lib.Plo
new file mode 100644
index 0000000..d78365b
--- /dev/null
+++ b/lib/src/lib/.deps/lib_libmy_lib_la-lib.Plo
@@ -0,0 +1,447 @@
1lib/lib_libmy_lib_la-lib.lo: lib/lib.c /usr/include/stdc-predef.h \
2 ../config.h lib/Lib.h /opt/efl/include/eina-1/Eina.h \
3 /opt/efl/include/eina-1/eina_config.h \
4 /opt/efl/include/eina-1/eina/eina_types.h \
5 /opt/efl/include/eina-1/eina_config.h \
6 /opt/efl/include/eina-1/eina/eina_alloca.h /usr/include/alloca.h \
7 /usr/include/features.h /usr/include/sys/cdefs.h \
8 /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
9 /usr/include/gnu/stubs-32.h \
10 /usr/lib/gcc/i686-pc-linux-gnu/4.8.2/include/stddef.h \
11 /opt/efl/include/eina-1/eina/eina_main.h \
12 /opt/efl/include/efl-1/Efl_Config.h \
13 /opt/efl/include/eina-1/eina/eina_types.h \
14 /opt/efl/include/eina-1/eina/eina_fp.h \
15 /usr/lib/gcc/i686-pc-linux-gnu/4.8.2/include/stdint.h \
16 /usr/include/stdint.h /usr/include/bits/wchar.h \
17 /opt/efl/include/eina-1/eina/eina_inline_f32p32.x /usr/include/stdlib.h \
18 /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
19 /usr/include/endian.h /usr/include/bits/endian.h \
20 /usr/include/bits/byteswap.h /usr/include/bits/types.h \
21 /usr/include/bits/typesizes.h /usr/include/bits/byteswap-16.h \
22 /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
23 /usr/include/bits/select.h /usr/include/bits/sigset.h \
24 /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
25 /usr/include/bits/pthreadtypes.h /usr/include/bits/stdlib-bsearch.h \
26 /usr/include/bits/stdlib-float.h \
27 /opt/efl/include/eina-1/eina/eina_inline_f16p16.x \
28 /opt/efl/include/eina-1/eina/eina_inline_f8p24.x \
29 /opt/efl/include/eina-1/eina/eina_inline_fp.x \
30 /opt/efl/include/eina-1/eina/eina_rectangle.h \
31 /opt/efl/include/eina-1/eina/eina_inline_rectangle.x \
32 /opt/efl/include/eina-1/eina/eina_clist.h \
33 /opt/efl/include/eina-1/eina/eina_inline_clist.x \
34 /opt/efl/include/eina-1/eina/eina_inlist.h \
35 /opt/efl/include/eina-1/eina/eina_iterator.h \
36 /opt/efl/include/eina-1/eina/eina_magic.h \
37 /opt/efl/include/eina-1/eina/eina_error.h \
38 /usr/lib/gcc/i686-pc-linux-gnu/4.8.2/include/stdarg.h \
39 /opt/efl/include/eina-1/eina/eina_accessor.h \
40 /opt/efl/include/eina-1/eina/eina_inline_inlist.x \
41 /opt/efl/include/eina-1/eina/eina_file.h \
42 /usr/lib/gcc/i686-pc-linux-gnu/4.8.2/include-fixed/limits.h \
43 /usr/lib/gcc/i686-pc-linux-gnu/4.8.2/include-fixed/syslimits.h \
44 /usr/include/limits.h /usr/include/bits/posix1_lim.h \
45 /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
46 /usr/include/bits/posix2_lim.h /usr/include/xlocale.h \
47 /usr/include/sys/stat.h /usr/include/bits/stat.h \
48 /opt/efl/include/eina-1/eina/eina_array.h \
49 /opt/efl/include/eina-1/eina/eina_inline_array.x /usr/include/stdio.h \
50 /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
51 /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
52 /usr/include/bits/stdio.h /opt/efl/include/eina-1/eina/eina_tmpstr.h \
53 /opt/efl/include/eina-1/eina/eina_list.h \
54 /opt/efl/include/eina-1/eina/eina_inline_list.x \
55 /opt/efl/include/eina-1/eina/eina_hash.h \
56 /opt/efl/include/eina-1/eina/eina_inline_hash.x \
57 /opt/efl/include/eina-1/eina/eina_trash.h \
58 /opt/efl/include/eina-1/eina/eina_inline_trash.x \
59 /opt/efl/include/eina-1/eina/eina_lalloc.h \
60 /opt/efl/include/eina-1/eina/eina_module.h \
61 /opt/efl/include/eina-1/eina/eina_mempool.h \
62 /opt/efl/include/eina-1/eina/eina_module.h \
63 /opt/efl/include/eina-1/eina/eina_inline_mempool.x /usr/include/string.h \
64 /usr/include/bits/string.h /usr/include/bits/string2.h \
65 /opt/efl/include/eina-1/eina/eina_error.h \
66 /opt/efl/include/eina-1/eina/eina_log.h \
67 /opt/efl/include/eina-1/eina/eina_inline_log.x \
68 /opt/efl/include/eina-1/eina/eina_inarray.h \
69 /opt/efl/include/eina-1/eina/eina_array.h \
70 /opt/efl/include/eina-1/eina/eina_binshare.h \
71 /opt/efl/include/eina-1/eina/eina_stringshare.h \
72 /opt/efl/include/eina-1/eina/eina_inline_stringshare.x \
73 /opt/efl/include/eina-1/eina/eina_stringshare.h \
74 /opt/efl/include/eina-1/eina/eina_ustringshare.h \
75 /opt/efl/include/eina-1/eina/eina_unicode.h \
76 /opt/efl/include/eina-1/eina/eina_inline_unicode.x \
77 /opt/efl/include/eina-1/eina/eina_inline_ustringshare.x \
78 /opt/efl/include/eina-1/eina/eina_ustringshare.h \
79 /opt/efl/include/eina-1/eina/eina_magic.h \
80 /opt/efl/include/eina-1/eina/eina_counter.h \
81 /opt/efl/include/eina-1/eina/eina_rbtree.h \
82 /opt/efl/include/eina-1/eina/eina_inline_rbtree.x \
83 /opt/efl/include/eina-1/eina/eina_accessor.h \
84 /opt/efl/include/eina-1/eina/eina_iterator.h \
85 /opt/efl/include/eina-1/eina/eina_benchmark.h \
86 /opt/efl/include/eina-1/eina/eina_convert.h \
87 /opt/efl/include/eina-1/eina/eina_fp.h \
88 /opt/efl/include/eina-1/eina/eina_cpu.h \
89 /opt/efl/include/eina-1/eina/eina_inline_cpu.x /usr/include/byteswap.h \
90 /opt/efl/include/eina-1/eina/eina_sched.h \
91 /opt/efl/include/eina-1/eina/eina_tiler.h \
92 /opt/efl/include/eina-1/eina/eina_rectangle.h \
93 /opt/efl/include/eina-1/eina/eina_inline_tiler.x \
94 /opt/efl/include/eina-1/eina/eina_safety_checks.h \
95 /opt/efl/include/eina-1/eina/eina_log.h \
96 /opt/efl/include/eina-1/eina/eina_thread.h \
97 /opt/efl/include/eina-1/eina/eina_hamster.h \
98 /opt/efl/include/eina-1/eina/eina_matrixsparse.h \
99 /opt/efl/include/eina-1/eina/eina_str.h \
100 /opt/efl/include/eina-1/eina/eina_inline_str.x \
101 /opt/efl/include/eina-1/eina/eina_strbuf.h \
102 /opt/efl/include/eina-1/eina/eina_binbuf.h \
103 /opt/efl/include/eina-1/eina/eina_ustrbuf.h \
104 /opt/efl/include/eina-1/eina/eina_unicode.h \
105 /opt/efl/include/eina-1/eina/eina_quadtree.h \
106 /opt/efl/include/eina-1/eina/eina_inlist.h \
107 /opt/efl/include/eina-1/eina/eina_simple_xml_parser.h \
108 /opt/efl/include/eina-1/eina/eina_lock.h \
109 /opt/efl/include/eina-1/eina/eina_inline_lock_posix.x \
110 /usr/include/sched.h /usr/include/bits/sched.h /usr/include/errno.h \
111 /usr/include/bits/errno.h /usr/include/linux/errno.h \
112 /usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
113 /usr/include/asm-generic/errno-base.h /usr/include/pthread.h \
114 /usr/include/bits/setjmp.h /usr/include/semaphore.h \
115 /usr/include/bits/semaphore.h /usr/include/sys/time.h \
116 /opt/efl/include/eina-1/eina/eina_prefix.h \
117 /opt/efl/include/eina-1/eina/eina_refcount.h \
118 /opt/efl/include/eina-1/eina/eina_mmap.h \
119 /opt/efl/include/eina-1/eina/eina_xattr.h \
120 /opt/efl/include/eina-1/eina/eina_value.h \
121 /opt/efl/include/eina-1/eina/eina_inarray.h \
122 /opt/efl/include/eina-1/eina/eina_list.h \
123 /opt/efl/include/eina-1/eina/eina_hash.h \
124 /opt/efl/include/eina-1/eina/eina_inline_value.x \
125 /opt/efl/include/eina-1/eina/eina_cow.h lib/lib_private.h
126
127/usr/include/stdc-predef.h:
128
129../config.h:
130
131lib/Lib.h:
132
133/opt/efl/include/eina-1/Eina.h:
134
135/opt/efl/include/eina-1/eina_config.h:
136
137/opt/efl/include/eina-1/eina/eina_types.h:
138
139/opt/efl/include/eina-1/eina_config.h:
140
141/opt/efl/include/eina-1/eina/eina_alloca.h:
142
143/usr/include/alloca.h:
144
145/usr/include/features.h:
146
147/usr/include/sys/cdefs.h:
148
149/usr/include/bits/wordsize.h:
150
151/usr/include/gnu/stubs.h:
152
153/usr/include/gnu/stubs-32.h:
154
155/usr/lib/gcc/i686-pc-linux-gnu/4.8.2/include/stddef.h:
156
157/opt/efl/include/eina-1/eina/eina_main.h:
158
159/opt/efl/include/efl-1/Efl_Config.h:
160
161/opt/efl/include/eina-1/eina/eina_types.h:
162
163/opt/efl/include/eina-1/eina/eina_fp.h:
164
165/usr/lib/gcc/i686-pc-linux-gnu/4.8.2/include/stdint.h:
166
167/usr/include/stdint.h:
168
169/usr/include/bits/wchar.h:
170
171/opt/efl/include/eina-1/eina/eina_inline_f32p32.x:
172
173/usr/include/stdlib.h:
174
175/usr/include/bits/waitflags.h:
176
177/usr/include/bits/waitstatus.h:
178
179/usr/include/endian.h:
180
181/usr/include/bits/endian.h:
182
183/usr/include/bits/byteswap.h:
184
185/usr/include/bits/types.h:
186
187/usr/include/bits/typesizes.h:
188
189/usr/include/bits/byteswap-16.h:
190
191/usr/include/sys/types.h:
192
193/usr/include/time.h:
194
195/usr/include/sys/select.h:
196
197/usr/include/bits/select.h:
198
199/usr/include/bits/sigset.h:
200
201/usr/include/bits/time.h:
202
203/usr/include/sys/sysmacros.h:
204
205/usr/include/bits/pthreadtypes.h:
206
207/usr/include/bits/stdlib-bsearch.h:
208
209/usr/include/bits/stdlib-float.h:
210
211/opt/efl/include/eina-1/eina/eina_inline_f16p16.x:
212
213/opt/efl/include/eina-1/eina/eina_inline_f8p24.x:
214
215/opt/efl/include/eina-1/eina/eina_inline_fp.x:
216
217/opt/efl/include/eina-1/eina/eina_rectangle.h:
218
219/opt/efl/include/eina-1/eina/eina_inline_rectangle.x:
220
221/opt/efl/include/eina-1/eina/eina_clist.h:
222
223/opt/efl/include/eina-1/eina/eina_inline_clist.x:
224
225/opt/efl/include/eina-1/eina/eina_inlist.h:
226
227/opt/efl/include/eina-1/eina/eina_iterator.h:
228
229/opt/efl/include/eina-1/eina/eina_magic.h:
230
231/opt/efl/include/eina-1/eina/eina_error.h:
232
233/usr/lib/gcc/i686-pc-linux-gnu/4.8.2/include/stdarg.h:
234
235/opt/efl/include/eina-1/eina/eina_accessor.h:
236
237/opt/efl/include/eina-1/eina/eina_inline_inlist.x:
238
239/opt/efl/include/eina-1/eina/eina_file.h:
240
241/usr/lib/gcc/i686-pc-linux-gnu/4.8.2/include-fixed/limits.h:
242
243/usr/lib/gcc/i686-pc-linux-gnu/4.8.2/include-fixed/syslimits.h:
244
245/usr/include/limits.h:
246
247/usr/include/bits/posix1_lim.h:
248
249/usr/include/bits/local_lim.h:
250
251/usr/include/linux/limits.h:
252
253/usr/include/bits/posix2_lim.h:
254
255/usr/include/xlocale.h:
256
257/usr/include/sys/stat.h:
258
259/usr/include/bits/stat.h:
260
261/opt/efl/include/eina-1/eina/eina_array.h:
262
263/opt/efl/include/eina-1/eina/eina_inline_array.x:
264
265/usr/include/stdio.h:
266
267/usr/include/libio.h:
268
269/usr/include/_G_config.h:
270
271/usr/include/wchar.h:
272
273/usr/include/bits/stdio_lim.h:
274
275/usr/include/bits/sys_errlist.h:
276
277/usr/include/bits/stdio.h:
278
279/opt/efl/include/eina-1/eina/eina_tmpstr.h:
280
281/opt/efl/include/eina-1/eina/eina_list.h:
282
283/opt/efl/include/eina-1/eina/eina_inline_list.x:
284
285/opt/efl/include/eina-1/eina/eina_hash.h:
286
287/opt/efl/include/eina-1/eina/eina_inline_hash.x:
288
289/opt/efl/include/eina-1/eina/eina_trash.h:
290
291/opt/efl/include/eina-1/eina/eina_inline_trash.x:
292
293/opt/efl/include/eina-1/eina/eina_lalloc.h:
294
295/opt/efl/include/eina-1/eina/eina_module.h:
296
297/opt/efl/include/eina-1/eina/eina_mempool.h:
298
299/opt/efl/include/eina-1/eina/eina_module.h:
300
301/opt/efl/include/eina-1/eina/eina_inline_mempool.x:
302
303/usr/include/string.h:
304
305/usr/include/bits/string.h:
306
307/usr/include/bits/string2.h:
308
309/opt/efl/include/eina-1/eina/eina_error.h:
310
311/opt/efl/include/eina-1/eina/eina_log.h:
312
313/opt/efl/include/eina-1/eina/eina_inline_log.x:
314
315/opt/efl/include/eina-1/eina/eina_inarray.h:
316
317/opt/efl/include/eina-1/eina/eina_array.h:
318
319/opt/efl/include/eina-1/eina/eina_binshare.h:
320
321/opt/efl/include/eina-1/eina/eina_stringshare.h:
322
323/opt/efl/include/eina-1/eina/eina_inline_stringshare.x:
324
325/opt/efl/include/eina-1/eina/eina_stringshare.h:
326
327/opt/efl/include/eina-1/eina/eina_ustringshare.h:
328
329/opt/efl/include/eina-1/eina/eina_unicode.h:
330
331/opt/efl/include/eina-1/eina/eina_inline_unicode.x:
332
333/opt/efl/include/eina-1/eina/eina_inline_ustringshare.x:
334
335/opt/efl/include/eina-1/eina/eina_ustringshare.h:
336
337/opt/efl/include/eina-1/eina/eina_magic.h:
338
339/opt/efl/include/eina-1/eina/eina_counter.h:
340
341/opt/efl/include/eina-1/eina/eina_rbtree.h:
342
343/opt/efl/include/eina-1/eina/eina_inline_rbtree.x:
344
345/opt/efl/include/eina-1/eina/eina_accessor.h:
346
347/opt/efl/include/eina-1/eina/eina_iterator.h:
348
349/opt/efl/include/eina-1/eina/eina_benchmark.h:
350
351/opt/efl/include/eina-1/eina/eina_convert.h:
352
353/opt/efl/include/eina-1/eina/eina_fp.h:
354
355/opt/efl/include/eina-1/eina/eina_cpu.h:
356
357/opt/efl/include/eina-1/eina/eina_inline_cpu.x:
358
359/usr/include/byteswap.h:
360
361/opt/efl/include/eina-1/eina/eina_sched.h:
362
363/opt/efl/include/eina-1/eina/eina_tiler.h:
364
365/opt/efl/include/eina-1/eina/eina_rectangle.h:
366
367/opt/efl/include/eina-1/eina/eina_inline_tiler.x:
368
369/opt/efl/include/eina-1/eina/eina_safety_checks.h:
370
371/opt/efl/include/eina-1/eina/eina_log.h:
372
373/opt/efl/include/eina-1/eina/eina_thread.h:
374
375/opt/efl/include/eina-1/eina/eina_hamster.h:
376
377/opt/efl/include/eina-1/eina/eina_matrixsparse.h:
378
379/opt/efl/include/eina-1/eina/eina_str.h:
380
381/opt/efl/include/eina-1/eina/eina_inline_str.x:
382
383/opt/efl/include/eina-1/eina/eina_strbuf.h:
384
385/opt/efl/include/eina-1/eina/eina_binbuf.h:
386
387/opt/efl/include/eina-1/eina/eina_ustrbuf.h:
388
389/opt/efl/include/eina-1/eina/eina_unicode.h:
390
391/opt/efl/include/eina-1/eina/eina_quadtree.h:
392
393/opt/efl/include/eina-1/eina/eina_inlist.h:
394
395/opt/efl/include/eina-1/eina/eina_simple_xml_parser.h:
396
397/opt/efl/include/eina-1/eina/eina_lock.h:
398
399/opt/efl/include/eina-1/eina/eina_inline_lock_posix.x:
400
401/usr/include/sched.h:
402
403/usr/include/bits/sched.h:
404
405/usr/include/errno.h:
406
407/usr/include/bits/errno.h:
408
409/usr/include/linux/errno.h:
410
411/usr/include/asm/errno.h:
412
413/usr/include/asm-generic/errno.h:
414
415/usr/include/asm-generic/errno-base.h:
416
417/usr/include/pthread.h:
418
419/usr/include/bits/setjmp.h:
420
421/usr/include/semaphore.h:
422
423/usr/include/bits/semaphore.h:
424
425/usr/include/sys/time.h:
426
427/opt/efl/include/eina-1/eina/eina_prefix.h:
428
429/opt/efl/include/eina-1/eina/eina_refcount.h:
430
431/opt/efl/include/eina-1/eina/eina_mmap.h:
432
433/opt/efl/include/eina-1/eina/eina_xattr.h:
434
435/opt/efl/include/eina-1/eina/eina_value.h:
436
437/opt/efl/include/eina-1/eina/eina_inarray.h:
438
439/opt/efl/include/eina-1/eina/eina_list.h:
440
441/opt/efl/include/eina-1/eina/eina_hash.h:
442
443/opt/efl/include/eina-1/eina/eina_inline_value.x:
444
445/opt/efl/include/eina-1/eina/eina_cow.h:
446
447lib/lib_private.h:
diff --git a/lib/src/lib/.dirstamp b/lib/src/lib/.dirstamp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lib/src/lib/.dirstamp
diff --git a/lib/src/lib/My_Lib.h b/lib/src/lib/My_Lib.h
new file mode 100644
index 0000000..67e2c48
--- /dev/null
+++ b/lib/src/lib/My_Lib.h
@@ -0,0 +1,43 @@
1#ifndef _MY_LIB_LIB_H
2#define _MY_LIB_LIB_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <Eina.h>
9
10/**
11 * Initialize Lib
12 *
13 * @return The init counter value.
14 *
15 * This function initializes Lib and increments a counter of the number
16 * of calls to it. The new counter value is then returned.
17 *
18 * @see my_lib_lib_shutdown().
19 */
20EAPI int
21my_lib_lib_init(void);
22
23/**
24 * Shutdown Lib
25 *
26 * @return The init counter value.
27 *
28 * This function finalizes Lib and decrments a counter of the number
29 * of calls to my_lib_lib_init(). The new counter value is then returned.
30 *
31 * @see my_lib_lib_shutdown().
32 */
33EAPI int
34my_lib_lib_shutdown(void);
35
36EAPI const char *
37my_lib_lib_hello(void);
38
39#ifdef __cplusplus
40}
41#endif
42
43#endif /* _MY_LIB_LIB_H */
diff --git a/lib/src/lib/my_lib.c b/lib/src/lib/my_lib.c
new file mode 100644
index 0000000..f099287
--- /dev/null
+++ b/lib/src/lib/my_lib.c
@@ -0,0 +1,72 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* HAVE_CONFIG_H */
4
5#include "My_Lib.h"
6#include "my_lib_private.h"
7
8int _my_lib_lib_log_dom = -1;
9int _my_lib_lib_init_count = 0;
10
11EAPI int
12my_lib_lib_init(void)
13{
14 const char * log_dom = "my_lib_lib";
15
16 if (++_my_lib_lib_init_count != 1)
17 {
18 DBG("init count is %d.", _my_lib_lib_init_count);
19 return _my_lib_lib_init_count;
20 }
21
22 if(!eina_init())
23 goto shutdown_eina;
24
25 _my_lib_lib_log_dom = eina_log_domain_register(log_dom, EINA_COLOR_LIGHTBLUE);
26 if (_my_lib_lib_log_dom < 0)
27 {
28 EINA_LOG_ERR("Could not register log domain: %s", log_dom);
29 goto shutdown_log_dom;
30 }
31
32 /* FIXME init stuff goes here */
33 DBG("init...");
34
35 return _my_lib_lib_init_count;
36
37shutdown_log_dom:
38 eina_shutdown();
39shutdown_eina:
40 return --_my_lib_lib_init_count;
41}
42
43EAPI int
44my_lib_lib_shutdown(void)
45{
46 if (_my_lib_lib_init_count <= 0)
47 {
48 ERR("init count not greater than 0.");
49 return 0;
50 }
51
52 if (--_my_lib_lib_init_count != 0)
53 {
54 DBG("init count is %d.", _my_lib_lib_init_count);
55 return _my_lib_lib_init_count;
56 }
57
58 /* FIXME shutdown stuff goes here */
59 DBG("shutdown...");
60
61 eina_shutdown();
62
63 return _my_lib_lib_init_count;
64}
65
66EAPI const char *
67my_lib_lib_hello(void)
68{
69 INF("called");
70 return "Hello from the EFL world";
71}
72
diff --git a/lib/src/lib/my_lib_private.h b/lib/src/lib/my_lib_private.h
new file mode 100644
index 0000000..4662d52
--- /dev/null
+++ b/lib/src/lib/my_lib_private.h
@@ -0,0 +1,33 @@
1#ifndef _MY_LIB_LIB_PRIVATE_H
2#define _MY_LIB_LIB_PRIVATE_H
3
4#include <Eina.h>
5
6extern int _my_lib_lib_log_dom;
7
8#ifdef CRITICAL
9#undef CRITICAL
10#endif
11#define CRITICAL(...) EINA_LOG_DOM_CRIT(_my_lib_lib_log_dom, __VA_ARGS__)
12
13#ifdef ERR
14#undef ERR
15#endif
16#define ERR(...) EINA_LOG_DOM_ERR(_my_lib_lib_log_dom, __VA_ARGS__)
17
18#ifdef WRN
19#undef WRN
20#endif
21#define WRN(...) EINA_LOG_DOM_WARN(_my_lib_lib_log_dom, __VA_ARGS__)
22
23#ifdef INF
24#undef INF
25#endif
26#define INF(...) EINA_LOG_DOM_INFO(_my_lib_lib_log_dom, __VA_ARGS__)
27
28#ifdef DBG
29#undef DBG
30#endif
31#define DBG(...) EINA_LOG_DOM_DBG(_my_lib_lib_log_dom, __VA_ARGS__)
32
33#endif /* _MY_LIB_LIB_PRIVATE_H */
diff --git a/lib/src/tests/my_lib_suite.c b/lib/src/tests/my_lib_suite.c
new file mode 100644
index 0000000..ccfcc9a
--- /dev/null
+++ b/lib/src/tests/my_lib_suite.c
@@ -0,0 +1,43 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* HAVE_CONFIG_H */
4
5#include <check.h>
6#include "My_Lib.h"
7
8START_TEST (test_my_lib_lib)
9{
10 ck_assert(my_lib_lib_init() == 1);
11 ck_assert(my_lib_lib_init() == 2);
12
13 ck_assert(strcmp(my_lib_lib_hello(), "Hello from the EFL world") == 0);
14
15 ck_assert(my_lib_lib_shutdown() == 1);
16 ck_assert(my_lib_lib_shutdown() == 0);
17 ck_assert(my_lib_lib_shutdown() == 0);
18}
19END_TEST
20
21Suite *
22my_lib_suite (void)
23{
24 Suite *s = suite_create ("Elm_Skel");
25
26 TCase *tc_core = tcase_create ("Core");
27 tcase_add_test (tc_core, test_my_lib_lib);
28 suite_add_tcase (s, tc_core);
29
30 return s;
31}
32
33int
34main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
35{
36 int number_failed;
37 Suite *s = my_lib_suite();
38 SRunner *sr = srunner_create(s);
39 srunner_run_all(sr, CK_ENV);
40 number_failed = srunner_ntests_failed(sr);
41 srunner_free(sr);
42 return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
43}