~ubuntu-branches/ubuntu/vivid/irssi-plugin-otr/vivid-proposed

« back to all changes in this revision

Viewing changes to .pc/gmodule-nolink.patch/configure.ac

  • Committer: Package Import Robot
  • Author(s): Antoine Beaupré
  • Date: 2013-05-10 19:43:24 UTC
  • mfrom: (4.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130510194324-cxrycs8zwiofjia9
Tags: 1.0.0~alpha2-1
* Ship a second binary package, with debugging symbols.
* New upstream patch: gmodule-nolink.patch to remove extra linking.
* Upload to unstable now that libotr5 is usable there.
* Restore the libotr5-4.0.0-2.1 dependency to make sure this is usuable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_INIT([irssi-otr],[1.0.0-alpha2],[dgoulet@ev0ke.net],[],[https://github.com/dgoulet/irssi-otr])
 
2
AC_CONFIG_AUX_DIR([config])
 
3
AC_CANONICAL_TARGET
 
4
AC_CANONICAL_HOST
 
5
AC_CONFIG_MACRO_DIR([config])
 
6
AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
 
7
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
8
 
 
9
AC_PROG_GREP
 
10
AC_PROG_CC
 
11
 
 
12
# We do not want to create a .a for the module, so disable by default.
 
13
AM_DISABLE_STATIC
 
14
AM_PROG_LIBTOOL
 
15
 
 
16
# Check for pthread
 
17
AC_CHECK_LIB([pthread], [pthread_create], [],
 
18
        [AC_MSG_ERROR([Cannot find libpthread. Use [LDFLAGS]=-Ldir to specify its location.])]
 
19
)
 
20
 
 
21
AC_ARG_WITH([irssi-headers],
 
22
        AS_HELP_STRING([--with-irssi-headers],
 
23
        [Directory containing the Irssi header files]),
 
24
        [IRSSI_HEADER_DIR="$withval"],
 
25
        [IRSSI_HEADER_DIR="\"\""])
 
26
 
 
27
# Check for Glib. It needs to be installed anyway or this macro will not be defined.
 
28
AM_PATH_GLIB_2_0([2.22.0], [],
 
29
                        [AC_MSG_ERROR([Glib 2.22 is required in order to compile.
 
30
                        Please install the Glib development files.])], [gmodule])
 
31
 
 
32
AM_PATH_LIBGCRYPT(1:1.2.0,,AC_MSG_ERROR(libgcrypt 1.2.0 or newer is required.))
 
33
 
 
34
AM_PATH_LIBOTR(4.0.0, [], [AC_MSG_ERROR([libotr 4.0.0 or newer is required.])])
 
35
 
 
36
pkg_modules="gmodule-2.0 >= 2.0.0"
 
37
PKG_CHECK_MODULES(GMODULE, [$pkg_modules])
 
38
 
 
39
LIBS="$LIBS $GMODULE_LIBS"
 
40
 
 
41
PACKAGE_CFLAGS="$GMODULE_CFLAGS -Wall -Werror=format-security"
 
42
AC_SUBST(PACKAGE_CFLAGS)
 
43
 
 
44
# Checking only a few Irssi headers is enough to tell that everything is
 
45
# available. This is broken I know but tell that to the irssi guys to NOT use
 
46
# cluster fu*** of headers and local inclusion system wide...
 
47
CPPFLAGS="$CPPFLAGS $PACKAGE_CFLAGS -I$IRSSI_HEADER_DIR"
 
48
AC_CHECK_HEADERS([\
 
49
                                irssi/src/common.h \
 
50
                                irssi/src/core/commands.h \
 
51
                                irssi/src/core/modules.h \
 
52
                                irssi/src/core/servers.h \
 
53
                                irssi/src/core/signals.h \
 
54
                                irssi/src/core/levels.h \
 
55
                                irssi/src/core/queries.h \
 
56
                                irssi/src/core/settings.h \
 
57
                                ], [], [AC_MSG_ERROR([Irssi Header files are needed])],
 
58
[
 
59
#include <irssi/irssi-config.h>
 
60
#ifdef HAVE_IRSSI_SRC_COMMON_H
 
61
#include <irssi/src/common.h>
 
62
#endif
 
63
])
 
64
 
 
65
LT_INIT
 
66
 
 
67
CFLAGS="-Wall $CFLAGS -g -fno-strict-aliasing -fstack-protector-all -D_FORTIFY_SOURCE=2 -O1 -Wl,-z,relro,-z,now -fPIE -pie $PACKAGE_CFLAGS"
 
68
 
 
69
DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_builddir)/src -I\$(top_builddir)/include"
 
70
AC_SUBST(DEFAULT_INCLUDES)
 
71
 
 
72
# Hardcoded here since irssi only searches in $HOME/.irssi/modules or this path
 
73
# which is unfortunate...
 
74
IRSSI_MODULE_DIR="/usr/lib/irssi/modules"
 
75
AC_SUBST(IRSSI_MODULE_DIR)
 
76
 
 
77
AC_CONFIG_FILES([
 
78
        Makefile
 
79
        help/Makefile
 
80
        src/Makefile
 
81
])
 
82
 
 
83
AC_OUTPUT
 
84
 
 
85
#
 
86
# Mini-report on what will be built
 
87
#
 
88
AS_ECHO()
 
89
 
 
90
# Target architecture we're building for
 
91
target_arch=$host_cpu
 
92
[
 
93
for f in $CFLAGS; do
 
94
        if test $f = "-m32"; then
 
95
                        target_arch="32-bit"
 
96
        elif test $f = "-m64"; then
 
97
                        target_arch="64-bit"
 
98
        fi
 
99
done
 
100
]
 
101
AS_ECHO_N("Target architecture: ")
 
102
AS_ECHO($target_arch)
 
103
 
 
104
# Print the bindir and libdir this `make install' will install into.
 
105
AS_ECHO()
 
106
AS_ECHO_N("Module will be installed in: ")
 
107
AS_ECHO("`eval eval echo $IRSSI_MODULE_DIR`")
 
108
AS_ECHO()