Add default Smack manifest for elektra.spec
[pkgs/e/elektra.git] / configure.ac
1 #
2 # Autoconf script for Elektra
3 #
4 # Markus Raab <elektra@markus-raab.org>
5 # Yannick Lecaillez <sizon5@gmail.com>
6 #
7
8 AC_PREREQ(2.59)
9 AC_REVISION([$Revision$])
10
11 m4_define(VERSION_MAJOR, [0])
12 m4_define(VERSION_MINOR, [7])
13 m4_define(VERSION_MICRO, [0])
14
15 AC_INIT(elektra, VERSION_MAJOR.VERSION_MINOR.VERSION_MICRO, http://bugs.libelektra.org)
16
17 AC_SUBST(KDB_VERSION, "VERSION_MAJOR.VERSION_MINOR.VERSION_MICRO")
18 AC_SUBST(KDB_VERSION_MAJORMINOR, "VERSION_MAJOR.VERSION_MINOR")
19 AC_SUBST(KDB_VERSION_MAJOR, "VERSION_MAJOR")
20 AC_SUBST(KDB_VERSION_MINOR, "VERSION_MINOR")
21 AC_SUBST(KDB_VERSION_MICRO, "VERSION_MICRO")
22 AC_SUBST(PACKAGE_URL, [http://www.libelektra.org/])
23
24 AC_SUBST(ELEKTRA_VERSION_API, [3:0:0])
25 AC_SUBST(ELEKTRATOOLS_VERSION_API, [2:0:0])
26 AC_SUBST(BACKEND_VERSION_API, [0:0:0])
27
28
29
30
31
32
33 #
34 # Os Specific checks
35 #
36
37 # get host_os variable
38 AC_CANONICAL_SYSTEM
39 AC_CANONICAL_TARGET
40
41 dnl workaround an incompatible install on solaris
42 INSTALL='\$(install_sh)'
43 AC_SUBST(INSTALL)
44
45 AC_CONFIG_SRCDIR([src/libelektra/kdb.c])
46 AM_INIT_AUTOMAKE
47 AC_CONFIG_HEADER([src/include/config.h])
48
49 dnl select POSIX extensions, useful on solaris, for example
50 gl_USE_SYSTEM_EXTENSIONS
51
52 #Check whether we are compiling for win32
53 case $host_os in
54 mingw* | pw32*)
55   # If compiling for windows we need HAVE_WIN32 defined
56         AC_DEFINE(HAVE_WIN32, 1, [Define if you are compiling for win32])
57 esac
58
59 # Disable libtool static lib
60 #AC_DISABLE_STATIC
61
62
63
64
65
66
67
68
69
70
71
72
73
74 #
75 # Compile and test specific flags.
76 #
77
78 dnl this macro is used to get the arguments supplied
79 dnl to the configure script (./configure --enable-debug)
80 dnl Check if we have enabled debug support.
81 AC_MSG_CHECKING(whether to enable debugging and take control over compiler flags)
82 AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],
83                 [turn on debug symbols and enable debug messages @<:@default=no@:>@])])
84
85 if test "x$enable_debug" = "xyes";
86 then
87         AC_MSG_RESULT(yes)
88
89         dnl remove the optimization flag
90         dnl gcc has -g -O2 as default (if none given)
91         CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*[ ]*//g'`
92         CXXFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*[ ]*//g'`
93
94         CFLAGS=`echo "$CFLAGS" | sed -e 's/-g[ ]*//g'`
95         CXXFLAGS=`echo "$CFLAGS" | sed -e 's/-g[ ]*//g'`
96
97         dnl STD flags will only be included where no POSIX is required
98         CSTDFLAGS="-std=c99 -ansi -pedantic"
99         COPTFLAGS="-O0"
100         CDBGFLAGS="-g -ggdb"
101
102         CXXSTDFLAGS="-std=c++98 -ansi -pedantic"
103         CXXOPTFLAGS="-O0"
104         CXXDBGFLAGS="-g -ggdb"
105
106         AC_DEFINE([DEBUG], 1,[enables debug output messages])
107         AC_DEFINE([VERBOSE], 0,[change here to be very verbose])
108 else
109         AC_MSG_RESULT(no)
110
111         AC_DEFINE([DEBUG], 0,[disable debug output messages])
112         AC_DEFINE([VERBOSE], 0,[disable verbose output messages])
113 fi
114 #take control over FLAGS
115 #AM_CONDITIONAL (USE_FLAGS, [test "x$enable_debug" = "xyes" ])
116 AM_CONDITIONAL(DEBUG, test x$enable_debug = xyes)
117
118
119 # Enable compilation of experimental things (unfinished
120 # backends at this time)
121 AC_ARG_ENABLE(experimental,
122               [AC_HELP_STRING([--enable-experimental],
123               [Specify to compile or not experimental parts (could cause compilation failure) @<:@default=no@:>@])],
124               [elektra_experimental=$enableval],
125               [elektra_experimental=no])
126 # for the c++ binding
127 AM_CONDITIONAL(EXPERIMENTAL, [ test "x$elektra_experimental" = "xyes" ])
128
129
130 # Run self-tests under valgrind?
131 AC_MSG_CHECKING([whether self tests are run under valgrind])
132 AC_ARG_ENABLE(valgrind-tests,
133         AS_HELP_STRING([--enable-valgrind-tests],
134         [run self tests under valgrind @<:@default=no@:>@]))
135 if test "x$enable_valgrind_tests" = "xyes";
136 then
137         AC_MSG_RESULT(yes)
138         AC_CHECK_PROGS(VALGRIND, valgrind)
139 else
140         AC_MSG_RESULT(no)
141 fi
142 AM_CONDITIONAL(VALGRINDTESTS, [ test "x$VALGRIND" != "x" ])
143
144
145 dnl thanks to the wine project, author: Aaron Arvey
146 dnl Check for --enable-gcov and add appropriate flags for gcc
147 dnl Note that these extra switches are NOT applied to the loader
148 AC_MSG_CHECKING(whether to enable gcov)
149 AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov],
150                 [turn on code coverage analysis tools @<:@default=no@:>@]))
151 if test "x$enable_gcov" = "xyes";
152 then
153         AC_MSG_RESULT(yes)
154         AC_CHECK_PROGS(LCOV, lcov, false)
155         AC_CHECK_PROGS(GENHTML, genhtml, false)
156
157         CDBGFLAGS="$CDBGFLAGS -fprofile-arcs -ftest-coverage"
158         CXXDBGFLAGS="$CXXDBGFLAGS -fprofile-arcs -ftest-coverage"
159
160         LDFLAGS="$LDFLAGS -lgcov"
161
162         dnl Turn off optimization so code coverage tool
163         dnl can get accurate line numbers
164         CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*[ ]*//g'`
165         CXXFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*[ ]*//g'`
166         COPTFLAGS="-O0"
167         CXXOPTFLAGS="-O0"
168 else
169         AC_MSG_RESULT(no)
170 fi
171
172 AC_SUBST(CSTDFLAGS)
173 AC_SUBST(COPTFLAGS)
174 AC_SUBST(CDBGFLAGS)
175
176 AC_SUBST(CXXSTDFLAGS)
177 AC_SUBST(CXXOPTFLAGS)
178 AC_SUBST(CXXDBGFLAGS)
179
180
181
182
183
184
185
186
187
188 #
189 # set some custom path
190 #
191
192 # usr/lib path
193 AC_SUBST(libdir)
194 echo "LIBDIR=$libdir"
195
196 AC_ARG_WITH(ulibdir,
197             [AC_HELP_STRING([--with-ulibdir=ULIBDIR>],
198              [Set the path for usr lib.])],
199              [ulibdir=$withval],
200              [ulibdir='${prefix}/'`basename $libdir`]
201              )
202 AC_SUBST(ulibdir)
203
204 # backend dlopended libraries path
205 AC_ARG_WITH(backenddir,
206             [AC_HELP_STRING([--with-backenddir=<path where backend libraries are>],
207              [Set the path for backend libraries. @<:@LIBDIR/elektra@@:>@])],
208              [backenddir=$withval],
209              [backenddir='${libdir}/elektra']
210              )
211 AC_SUBST(backenddir)
212
213 # high level backend dlopended libraries path
214 AC_ARG_WITH(hlvlbackenddir,
215             [AC_HELP_STRING([--with-hlvl-backenddir=<path where high level backend libraries are>],
216              [Set the path for high level backend libraries. @<:@ULIBDIR/elektra@:>@])],
217              [hlvlbackenddir=$withval],
218              [hlvlbackenddir='${ulibdir}']
219              )
220 AC_SUBST(hlvlbackenddir)
221
222 # /usr/share/doc path
223 AC_ARG_WITH(docdir,
224             [AC_HELP_STRING([--with-docdir=<path where doc will be installed>],
225              [Set the path for documentation. @<:@DATADIR/doc/elektra@:>@])],
226              [docdir=$withval],
227              [docdir='${datadir}/doc/elektra']
228              )
229 AC_SUBST(docdir)
230
231 # /usr/share/doc/elektra-api
232 AC_ARG_WITH(develdocdir,
233             [AC_HELP_STRING([--with-develdocdir=<path where elektra-api doc will be installed>],
234              [Set the path for elektra api documentation. @<:@DATADIR/doc/elektra-devel@:>@])],
235              [develdocdir=$withval],
236              [develdocdir='${datadir}/doc/elektra-devel']
237              )
238 AC_SUBST(develdocdir)
239
240 # Select docbook.xsl
241 AC_ARG_WITH(docbook,
242             [AC_HELP_STRING([--with-docbook=<path to docbook.xsl>],
243              [Set path to docbook.xsl used for generate manpage. @<:@/usr/share/sgml/docbook/xsl-stylesheets@:>@])],
244              [default_docbook=$withval],
245              [default_docbook=/usr/share/sgml/docbook/xsl-stylesheets]
246              )
247 AC_SUBST(default_docbook)
248
249 # sgml/elektra-<VERSION>
250 AC_ARG_WITH(kdbschema,
251             [AC_HELP_STRING([--with-kdbschemadir=<relative path to kdb schema>],
252              [Set the path for elektra.xsd. DATADIR will be prefixed. @<:@/sgml/elektra-$PACKAGE_VERSION@:>@])],
253              [kdbschemadir=$withval],
254              [kdbschemadir="/sgml/elektra-$PACKAGE_VERSION"]
255              )
256 AC_DEFINE_UNQUOTED([KDB_SCHEMA_PATH], DATADIR "${kdbschemadir}", path for elektra.xsd)
257
258
259 # Default backend selection (Set to 'filesys' as default)
260 AC_ARG_WITH(backend,
261             [AC_HELP_STRING([--with-default-backend=<backend>],
262              [Set backend elektra will be linked to. @<:@filesys@:>@])],
263              [default_backend=$withval],
264              [default_backend=filesys]
265              )
266 AC_SUBST(default_backend)
267
268 # Default daemon backend selection (Set to 'berkeleydb' as default)
269 AC_ARG_WITH(dbackend,
270             [AC_HELP_STRING([--with-default-dbackend=<daemon backend>],
271              [Set the default backend for the kdbd daemon to use. @<:@berkeleydb@:>@])],
272              [default_dbackend=$withval],
273              [default_dbackend=berkeleydb]
274              )
275 AC_SUBST(default_dbackend)
276
277
278
279
280
281
282
283 #
284 # Checks for needed programs.
285 #
286
287 AC_PROG_CC
288 AM_PROG_CC_C_O
289
290 AC_PROG_CXX
291
292 AC_PROG_LN_S
293 AC_PROG_SED
294 AC_CHECK_PROG(NM, nm, nm, nm-is-missing)
295 AC_PROG_MAKE_SET
296
297 PKG_PROG_PKG_CONFIG
298
299 # Check needed programs for generate doc
300
301 # xsltproc
302 AC_PATH_PROG(xsltproc, xsltproc, "no")
303 # Check if have style-sheet too
304 if test "x$default_docbook" != "xno"; then
305         AC_CHECK_FILE([$default_docbook/manpages/docbook.xsl],
306                       [dbroot=$default_docbook],
307                       [dbroot="no"])
308         if test "x$default_docbook" != "xno"; then
309                 AC_CHECK_FILE([$default_docbook/template/titlepage.xsl],
310                               [dbroot=$default_docbook],
311                               [dbroot="no"])
312         fi
313 else
314         dbroot="no"
315 fi
316
317 AC_SUBST(dbroot)
318 AM_CONDITIONAL(HAVE_XSL, test x$xsltproc != xno -a x$dbroot != xno)
319
320 # man2html
321 AC_PATH_PROG(man2html, man2html, "no")
322 AM_CONDITIONAL(HAVE_MAN2HTML, test x$man2html != xno)
323
324 # Doxygen
325 AC_PATH_PROG(doxygen, doxygen, "no")
326 AM_CONDITIONAL(HAVE_DOXYGEN, test x$doxygen != xno)
327
328
329
330
331
332
333
334 #
335 # Checks for header files.
336 #
337
338 AC_HEADER_STDC
339 AC_CHECK_HEADERS([ ctype.h stdlib.h unistd.h errno.h time.h stdio.h ])
340 AC_CHECK_HEADERS([ langinfo.h locale.h ])
341 AC_HEADER_TIME
342
343 #types
344 AC_CHECK_HEADERS([ inttypes.h limits.h ])
345 AC_HEADER_STDBOOL
346
347 #posix files and functions (needed by filesys and libhelper)
348 AC_HEADER_DIRENT
349 AC_CHECK_HEADERS([ fcntl.h ])
350
351
352
353
354
355
356 #
357 # libltld checks
358 #
359
360 #copied out from libsox
361
362 AC_ARG_WITH(libltdl,
363     AC_HELP_STRING([--without-libltdl],
364         [Don't try to use libltdl for external dynamic library support]))
365
366 using_libltdl=no
367 if test "$with_libltdl" != "no"; then
368         dnl Disable libltdl support when building only static libraries
369         if test "$enable_shared" != "no"; then
370                 using_libltdl=yes
371         fi
372
373         dnl Force off when building on w32, we have specific code for that
374         dnl in libloader.
375         case $host_os in
376                 pw32* | mingw*)
377                         using_libltdl=no
378                         ;;
379         esac
380
381         dnl Force off using libltdl on targets that are know to have
382         dnl problems.
383         case $target in
384                 *cygwin*)
385                         using_libltdl=no
386                         ;;
387         esac
388 fi
389
390 if test "$using_libltdl" != "no"; then
391   AC_LIBLTDL_INSTALLABLE
392   AC_LIBTOOL_DLOPEN
393 fi
394 AC_PROG_LIBTOOL
395 AC_SUBST(LIBTOOL_DEPS)
396 AC_CONFIG_SUBDIRS(libltdl)
397 if test "$using_libltdl" != "no"; then
398   AC_SUBST(LIBLTDL)
399   AC_SUBST(LTDLINCL)
400   AC_CHECK_HEADERS(ltdl.h, AC_DEFINE([HAVE_LIBLTDL], 1, [Define to 1 if you have libltdl]), [using_libltdl=no])
401 fi
402 AM_CONDITIONAL(HAVE_LIBLTDL, test x$using_libltdl = xyes)
403
404
405
406
407
408
409
410
411 #
412 # Checks for libraries.
413 #
414
415
416 # Check for iconv
417 # If iconv usage is enabled we need to check for iconv.
418 # This may also result in linking against libiconv,
419 # if the system requires this for a working iconv function.
420 dnl Check if the user wants to enable iconv support and
421 dnl hence enable charset conversions.
422 dnl Default: dont enable it
423 AC_MSG_CHECKING(whether to enable iconv)
424 AC_ARG_ENABLE(iconv,
425                 [AC_HELP_STRING([--enable-iconv],
426                 [turns on automatic UTF-8 conversions. @<:@default=no@:>@])])
427
428 if test "x$enable_iconv" = "xyes"; then
429         AC_MSG_RESULT(yes)
430         AM_ICONV()
431 else
432         AC_MSG_RESULT(no)
433 fi
434
435 privatelibs=""
436
437 # Check for libxml (Allow compilation of libelektratools)
438 AM_PATH_XML2(, [elektra_have_xml="yes"], [elektra_have_xml="no"])
439 AM_CONDITIONAL(HAVE_XML, [test x$elektra_have_xml = xyes])
440 if test "x$elektra_have_xml" = "xyes"; then
441         elektratools=libelektratools
442         privatelibs=$privatelibs" -lxml2"
443 fi
444
445 AC_SUBST(elektratools)
446
447
448
449
450
451
452
453
454 #
455 # Backends enable and disable logic.
456 #
457
458 BACKENDS=""
459 TESTBACKENDS=""
460
461 # $1 is the backend name
462 # $2 is the check for prerequisite
463 # $3 is the default value YES or NO
464 AC_DEFUN([ALLOW_BACKEND],
465 [
466         TESTBACKENDS="$TESTBACKENDS
467         $1      check: $2,      default: $3"
468         if test "$3" == YES; then
469                 BACKENDS="$BACKENDS $1";
470         fi
471         AC_ARG_ENABLE([$1],
472                 AC_HELP_STRING([--enable-$1], [compile $1 backend @<:@default=$3@:>@]),
473                 [if test "$enableval" = yes; then
474                         if $2; then
475                                 BACKENDS="$BACKENDS $1";
476                         else
477                                 #thus only default backends are in BACKENDS and
478                                 #they don't have prerequisites, don't remove
479                                 AC_MSG_WARN([not building backend $1, prerequisite missing])
480                         fi
481                 else
482                         #removed backend out of BACKENDS list
483                         BACKENDS=$(echo "$BACKENDS" | sed 's/[[:space:]]*$1//')
484                 fi
485         ])
486 ])
487
488 ALLOW_BACKEND(filesys, true, YES)
489
490 ALLOW_BACKEND(hosts, true, YES)
491
492 ALLOW_BACKEND(ini, true, NO)
493
494 elektra_have_db=no
495 # Check for libdb (Allow compilation of libelektra-berkeley.so)
496 AC_CHECK_HEADERS([db.h],[
497   AC_CHECK_LIB([db], [db_create], [elektra_have_db="yes"])
498 ])
499 ALLOW_BACKEND(berkeleydb, [test x$elektra_have_db = xyes], NO)
500
501
502 # Check for libGconf (Allow compilation of libelektra-gconf.so)
503 PKG_CHECK_MODULES(gconf, gconf-2.0, [elektra_have_gconf="yes"], [elektra_have_gconf="no"])
504 ALLOW_BACKEND(gconf, [test x$elektra_have_gconf = xyes], NO)
505
506 elektra_glibc_mntent=no
507 AC_CHECK_HEADERS([mntent.h],[
508    AC_TRY_LINK([#include <stdio.h>
509 #include <mntent.h> ],
510 [
511 struct mntent *m;
512 FILE *f;
513 char *fsname, *dir, *type, *opts;
514 int freq, passno;
515 f=setmntent("/etc/fstab", "r");
516 m=getmntent(f);
517 fsname=m->mnt_fsname;
518 dir=m->mnt_dir;
519 type=m->mnt_type;
520 opts=m->mnt_opts;
521 freq=m->mnt_freq;
522 passno=m->mnt_passno;
523 ],
524 dnl DEFINE is not used in the code
525    [ AC_DEFINE(GETMNTENT_GLIBC, 1, 
526      [Define this if mntent follows glibc conventions])
527    elektra_glibc_mntent=yes],
528    []
529 )])
530
531
532 AC_MSG_CHECKING([if mntent follows the glibc conventions])
533 if test x$elektra_glibc_mntent = xyes; then
534    AC_MSG_RESULT(yes)
535 else
536    AC_MSG_RESULT(no)
537 fi
538 ALLOW_BACKEND(fstab, [test x$elektra_glibc_mntent = xyes], NO)
539
540 AC_CHECK_HEADERS([pwd.h],
541    [ AC_DEFINE(HAVE_PWD_H, 1, 
542      [Define this if pwd.h is present on your system])
543    elektra_pwd_h=yes]
544 )
545 ALLOW_BACKEND(passwd, [test x$elektra_pwd_h = xyes], NO)
546
547 # daemon depends on struct ucred in ipc.c
548 elektra_ucred=no
549 AC_CHECK_MEMBERS([struct ucred.pid], [elektra_ucred=yes], [elektra_ucred=no],
550                  [#include <sys/socket.h>])
551 ALLOW_BACKEND(daemon, [test x$elektra_ucred = xyes], NO)
552
553 AC_SUBST(BACKENDS)
554
555 backend_static_libs=
556 for backend in $BACKENDS; do
557         backend_static_libs="$backend_static_libs ../backends/${backend}/libelektra-${backend}.a"
558 done
559
560 AC_SUBST(privatelibs)
561 AC_SUBST(backend_static_libs)
562
563
564
565
566
567
568
569 #
570 # Bindings enable and disable logic.
571 #
572
573 BINDINGS=""
574
575 # $1 is the binding name
576 # $2 is the check for prerequisite
577 # $3 is the default value YES or NO
578 AC_DEFUN([ALLOW_BINDING],
579 [
580         if test "$3" == YES; then
581                 BINDINGS="$BINDINGS $1";
582         fi
583         AC_ARG_ENABLE([$1],
584                 AC_HELP_STRING([--enable-$1], [compile $1 binding  @<:@default=$3@:>@]),
585                 [if test "$enableval" = yes; then
586                         if $2; then
587                                 BINDINGS="$BINDINGS $1";
588                         else
589                                 #thus only default bindings are in BINDINGS and
590                                 #they don't have prerequisites, don't remove
591                                 AC_MSG_WARN([not building binding $1, prerequisite missing])
592                         fi
593                 else
594                         #removed bindings out of BINDINGS list
595                         BINDINGS=$(echo "$BINDINGS" | sed 's/[[:space:]]*$1//')
596                 fi
597         ])
598 ])
599
600 ALLOW_BINDING(cpp, true, YES)
601
602 #AC_CHECK_PROGS(SCHEME, scheme, false)
603 #ALLOW_BINDING(scheme, [test "x$SCHEME" = xscheme], NO)
604
605 AC_CHECK_PROGS(PYTHON, python, false)
606 ALLOW_BINDING(python, [test "x$PYTHON" = xpython], NO)
607
608 AC_SUBST(BINDINGS)
609
610 # inspired from daemontools
611 AC_CHECK_HEADERS([signal.h],[
612    AC_TRY_LINK([#include <signal.h>],
613 [
614 sigset_t ss;
615  
616 sigemptyset(&ss);
617 sigaddset(&ss,SIGCHLD);
618 sigprocmask(SIG_SETMASK,&ss,(sigset_t *) 0);
619 ],
620     [AC_DEFINE([HASSIGPROCMASK],[],[POSIX signal available])])
621     AC_TRY_LINK([#include <signal.h>],
622 [
623 int sig;
624 struct sigaction sa;;
625 sa.sa_handler = f;
626 sa.sa_flags = 0;
627 sigemptyset(&sa.sa_mask);
628 sigaction(sig,&sa,(struct sigaction *) 0); 
629 ],
630     [AC_DEFINE([HASSIGACTION],[],[sigaction available])])
631 ])
632
633
634
635
636
637
638
639
640 #
641 # Checks for typedefs, structures, and compiler characteristics.
642 #
643
644 AC_C_CONST
645 AC_TYPE_UID_T
646 AC_CHECK_TYPE(gid_t, int)
647 AC_CHECK_TYPE(time_t, unsigned long)
648 AC_TYPE_MODE_T
649
650 AC_TYPE_OFF_T
651 AC_TYPE_SIZE_T
652 AC_TYPE_SSIZE_T
653
654 AC_MSG_CHECKING([For a working getopt])
655 AC_TRY_LINK([#include <unistd.h>],
656 [
657 int opt;
658 char** myargv;
659 opt=getopt(1,myargv,"a");
660 if (optind == 2) {opt = 3;};
661 ],
662 [
663   AC_DEFINE([HASGETOPT],[],[Working getopt])
664   AC_MSG_RESULT(yes)
665 ],
666 [AC_MSG_RESULT(no)])
667
668
669
670
671
672
673
674
675
676
677 #
678 # Checks for library functions.
679 #
680 #AC_FUNC_MALLOC
681 #AC_FUNC_MEMCMP
682 #AC_FUNC_REALLOC
683
684 AC_FUNC_CHOWN
685 AC_FUNC_CLOSEDIR_VOID
686 AC_FUNC_GETMNTENT
687 #AC_FUNC_MALLOC
688 #AC_FUNC_MEMCMP
689 #AC_FUNC_REALLOC
690 AC_FUNC_STAT
691
692 #old version
693 AC_CHECK_FUNCS([memset nl_langinfo setenv setlocale strcasecmp strchr strrchr index rindex strtol ctime_r getuid getgid sigprocmask sigaction])
694 #for testing suite
695 AC_CHECK_FUNCS([clearenv setenv])
696 #generated by autoscan, TODO. merge together
697 AC_CHECK_FUNCS([ftruncate getmntent gettimeofday memmove memset mkdir nl_langinfo putenv rmdir setenv setlocale socket strcasecmp strchr strndup strrchr strstr strtol])
698
699
700
701
702
703
704
705 #
706 # Output
707 #
708 AC_CONFIG_FILES([Makefile])
709 AC_CONFIG_FILES([elektra.spec])
710 AC_OUTPUT([src/Makefile
711
712            src/libhelper/Makefile
713            src/libloader/Makefile
714
715            src/libelektra/Makefile
716            src/libelektra/exportobjects.sh
717
718            src/libelektratools/Makefile
719
720            src/preload/Makefile
721            src/kdb/Makefile
722
723            src/backends/Makefile
724            src/backends/berkeleydb/Makefile
725            src/backends/filesys/Makefile
726            src/backends/fstab/Makefile
727            src/backends/passwd/Makefile
728            src/backends/hosts/Makefile
729            src/backends/gconf/Makefile
730            src/backends/template/Makefile
731            src/backends/ini/Makefile
732            src/backends/daemon/Makefile
733
734            src/bindings/Makefile
735            src/bindings/cpp/Makefile
736            src/bindings/cpp/tests/Makefile
737            src/bindings/python/Makefile
738
739            src/include/Makefile
740
741            doc/Makefile
742            doc/images/Makefile
743            doc/standards/Makefile
744
745            scripts/Makefile
746
747            xmlschema/Makefile
748
749            elektra.pc
750            elektratools.pc
751            elektracpp.pc
752
753            benchmarks/Makefile
754            examples/Makefile
755            tests/Makefile
756            ])
757
758 echo "--------------------------------"
759 echo " libelektra                     "
760 echo "--------------------------------"
761 echo ""
762 echo "Test backends: $TESTBACKENDS"
763 echo ""
764 echo "Compile backends: $BACKENDS"
765 echo "Compile bindings: $BINDINGS"
766 echo -n "Compile libelektratools: "
767 if test "x$elektra_have_xml" = "xyes"; then
768         echo "yes"
769 else
770         echo "no"
771 fi
772 echo ""
773 echo "type: make && make install"
774