Build libcontrib only when really needed.
[silc.git] / lib / contrib / Makefile.am
1 #
2 #  Makefile.am
3 #
4 #  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
5 #
6 #  Copyright (C) 2000 Pekka Riikonen
7 #
8 #  This program is free software; you can redistribute it and/or modify
9 #  it under the terms of the GNU General Public License as published by
10 #  the Free Software Foundation; either version 2 of the License, or
11 #  (at your option) any later version.
12 #
13 #  This program is distributed in the hope that it will be useful,
14 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #  GNU General Public License for more details.
17 #
18
19 AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
20
21 if HAVE_GETOPT_LONG
22 if HAVE_REGEX
23 noinst_LTLIBRARIES =
24 else
25 noinst_LTLIBRARIES = libcontrib.la
26 endif
27 else
28 noinst_LTLIBRARIES = libcontrib.la
29 endif
30
31
32 if HAVE_GETOPT_LONG
33 GETOPT =
34 else
35 GETOPT = getopt.c getopt1.c
36 endif
37
38 if HAVE_REGEX
39 REGEX =
40 else
41 REGEX = regex.c
42 endif
43
44 if SILC_WIN32
45 libcontrib_la_SOURCES =
46 else
47 libcontrib_la_SOURCES = \
48         $(GETOPT) \
49         $(REGEX)
50 endif
51
52 if SILC_DIST_TOOLKIT
53 include_HEADERS = getopt.h regex.h
54 endif
55
56 EXTRA_DIST = *.c *.h
57
58 include $(top_srcdir)/Makefile.defines.in