File: configure.in

package info (click to toggle)
libopenhbci-plugin-ddvcard 0.4.2-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,544 kB
  • ctags: 178
  • sloc: sh: 8,267; cpp: 2,159; makefile: 114
file content (134 lines) | stat: -rw-r--r-- 3,316 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([Makefile.in])
AUTHOR="Martin Preuss <martin@libchipcard.de>, Fabian Kaiser <fabian.kaiser@gmx.de>, Christian Stimming <stimming@tuhh.de>"

AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE(openhbci-plugin-ddvcard,0.4.2)
AC_CONFIG_HEADERS([config.h])

AM_MAINTAINER_MODE

AC_DEFINE_UNQUOTED(AUTHOR,"$AUTHOR",[author of this package])
AC_SUBST(AUTHOR)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)

dnl
dnl setup rpm 
dnl
rpm_build_root="/tmp/openhbci-ddvcard-buildroot"
rpm_version="0.4.2"
rpm_release="1"
AC_SUBST(rpm_version)
AC_SUBST(rpm_release)
AC_SUBST(rpm_build_root)


dnl
dnl module versioning
dnl
DDVCARD_MODULE_CURRENT=1
DDVCARD_MODULE_REVISION=4
DDVCARD_MODULE_AGE=1
AC_SUBST(DDVCARD_MODULE_CURRENT)
AC_DEFINE_UNQUOTED(DDVCARD_MODULE_CURRENT,$DDVCARD_MODULE_CURRENT,[current])
AC_SUBST(DDVCARD_MODULE_REVISION)
AC_DEFINE_UNQUOTED(DDVCARD_MODULE_REVISION,$DDVCARD_MODULE_REVISION,[revision])
AC_SUBST(DDVCARD_MODULE_AGE)
AC_DEFINE_UNQUOTED(DDVCARD_MODULE_AGE,$DDVCARD_MODULE_AGE,[age])


# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_AWK
AM_PROG_LIBTOOL

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

# Checks for library functions.

# determine prefix
AC_PREFIX_DEFAULT([/usr/local])
if test "x$prefix" = "xNONE" ; then
    prefix=$ac_default_prefix
    ac_configure_args="$ac_configure_args --prefix $prefix"
fi

all_libraries=""
all_includes=""

dnl
dnl check for libchipcard
dnl
AC_LIBCHIPCARD(0,9,0,5)
AC_MSG_CHECKING(if libchipcard is useable)
if test "x$libchipcard_libs" != "x"; then
  AC_MSG_RESULT(yes)
else
  AC_MSG_RESULT(no)
  AC_MSG_ERROR([Libchipcard is required for this plugin.])
fi

dnl
dnl check for openhbci
dnl

# check if we are a part of OpenHBCI
ts=`pwd | grep "ext_plugins/openhbci-plugin-ddvcard"`
if test "x$ts" != "x"; then
   AC_MSG_NOTICE([This plugin seems to be part of OpenHBCI])
   OPENHBCI_CXXFLAGS="-I\${top_srcdir}/../.. -I\${top_srcdir}/../../openhbci"
   OPENHBCI_LIBS="-L\${top_srcdir}/../../src/openhbci -lopenhbci"
   PLUGIN_PATH=""
else
   AM_PATH_OPENHBCI(0.9.12)
   # check for plugin path
   AC_MSG_CHECKING(for plugin path)
   AC_ARG_WITH(pluginpath, [  --with-pluginpath=DIR   where to store plugins (only for experts!)],
     [ PLUGIN_PATH="$withval" ],
     [ if ! PLUGIN_PATH=`openhbci-config --plugins` ; then
	 AC_MSG_ERROR([Error when calling openhbci-config --plugins (maybe old version somewhere?): $PLUGIN_PATH])
       fi
     ])
   AC_MSG_RESULT($PLUGIN_PATH)
fi
all_libraries="$all_libraries $OPENHBCI_LIBS $libchipcard_libs"
all_includes="$all_includes $OPENHBCI_CXXFLAGS $libchipcard_includes"
AC_SUBST(PLUGIN_PATH)

dnl
dnl Check for path to store API documentation
dnl
AC_MSG_CHECKING(for docpath)
AC_ARG_WITH(docpath, [  --with-docpath=DIR 	  stores api doc in the given path],
  [docpath="$withval"],
  [docpath="apidoc"])
AC_SUBST(docpath)
AC_MSG_RESULT($docpath)

dnl set the library paths/include paths
AC_SUBST(all_includes)
AC_SUBST(all_libraries)


dnl
dnl now create Makefiles
dnl
AC_CONFIG_FILES([Makefile \
	  Doxyfile \
          openhbci-ddvcard.spec \
          src/Makefile \
	])
AC_OUTPUT