Imported Upstream version 0.9.2
[platform/upstream/iotivity.git] / service / protocol-plugin / lib / cpluff / examples / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 dnl Copyright 2007 Johannes Lehtinen
4 dnl This configure.ac script is free software; Johannes Lehtinen gives
5 dnl unlimited permission to copy, distribute and modify it.
6
7 # Autoconf initialization
8 # -----------------------
9 AC_INIT([C-Pluff examples], [unspecified], [johannes.lehtinen@iki.fi], [cpluff-examples])
10 AC_COPYRIGHT([Copyright 2007 Johannes Lehtinen
11 This configure script is free software; Johannes Lehtinen gives unlimited
12 permission to copy, distribute and modify it.])
13 AC_CONFIG_SRCDIR([cpfile/README.txt])
14 AC_CONFIG_AUX_DIR([auxliary])
15
16 # Automake initialization
17 # -----------------------
18 AM_INIT_AUTOMAKE([foreign])
19
20 # C/C++ compiler settings
21 # -------------------
22 AC_LANG([C])
23 AC_PROG_CC
24 if test -z "$CC"; then
25   AC_MSG_ERROR([C compiler was not found (required)])
26 fi
27 AC_PROG_CC_C_O
28 AC_C_CONST
29 AC_LIBTOOL_DLOPEN
30 AC_LIBTOOL_WIN32_DLL
31 AC_PROG_LIBTOOL
32
33 # Check for C-Pluff loader
34 # ------------------------
35 AC_CHECK_PROG([CPLUFF_LOADER], [cpluff-loader], [cpluff-loader])
36 if test -z "$CPLUFF_LOADER"; then
37   AC_MSG_ERROR([C-Pluff Loader, cpluff-loader, not found])
38 fi
39
40 # Check for C-Pluff headers and library
41 # -------------------------------------
42 AC_CHECK_HEADER([cpluff.h],, AC_MSG_ERROR([C-Pluff header files not found]))
43 AC_CHECK_LIB([cpluff], [cp_init],, AC_MSG_ERROR([C-Pluff libraries not found]))
44
45 # Check for stat/lstat functions
46 # ------------------------------
47 AC_CHECK_FUNCS([stat lstat])
48
49 # Output Makefiles
50 # ----------------
51 AC_CONFIG_FILES([Makefile
52 cpfile/Makefile
53 cpfile/cpfile
54 cpfile/plugins/Makefile
55 cpfile/plugins/cext/Makefile
56 cpfile/plugins/core/Makefile
57 cpfile/plugins/extension/Makefile
58 cpfile/plugins/special/Makefile
59 ])
60 AC_OUTPUT