Made lib/contrib stuff compilation conditional.
[silc.git] / lib / contrib / Makefile.am
index 64305b1b618d192cab82074d20846d8d09be80f8..0c3ec06d8b83037cce2a357da4562bfcc5b74d14 100644 (file)
@@ -20,11 +20,30 @@ AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
 
 noinst_LIBRARIES = libcontrib.a
 
+if HAVE_GETOPT_LONG
+GETOPT =
+else
+GETOPT = getopt.c getopt1.c
+endif
+
+if HAVE_REGEX
+REGEX =
+else
+REGEX = regex.c
+endif
+
+if SILC_WIN32
+libcontrib_a_SOURCES =
+else
 libcontrib_a_SOURCES = \
-       getopt.c \
-       getopt1.c \
-       regex.c
+       $(GETOPT) \
+       $(REGEX)
+endif
+
+if SILC_DIST_TOOLKIT
+include_HEADERS = getopt.h regex.h
+endif
 
-EXTRA_DIST = *.h
+EXTRA_DIST = *.c *.h
 
-include $(top_srcdir)/Makefile.defines
+include $(top_srcdir)/Makefile.defines.in