Added shared library compilation support.
[silc.git] / lib / contrib / Makefile.am
index e5fcf4c40865eef075692832be4760f30feda2b0..b7bec728e1b63e1d8a01b34e39adf8a95b428f6e 100644 (file)
 
 AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
 
-noinst_LIBRARIES = libcontrib.a
+noinst_LTLIBRARIES = libcontrib.la
 
-libcontrib_a_SOURCES = \
-       getopt.c \
-       getopt1.c \
-       regex.c
+if HAVE_GETOPT_LONG
+GETOPT =
+else
+GETOPT = getopt.c getopt1.c
+endif
 
-EXTRA_DIST = *.h
+if HAVE_REGEX
+REGEX =
+else
+REGEX = regex.c
+endif
+
+if SILC_WIN32
+libcontrib_la_SOURCES =
+else
+libcontrib_la_SOURCES = \
+       $(GETOPT) \
+       $(REGEX)
+endif
+
+if SILC_DIST_TOOLKIT
+include_HEADERS = getopt.h regex.h
+endif
+
+EXTRA_DIST = *.c *.h
 
 include $(top_srcdir)/Makefile.defines.in