Made lib/contrib stuff compilation conditional.
[silc.git] / lib / contrib / Makefile.am
index 516e97be3f27cb2136dfc873984ce3f85a1493c6..0c3ec06d8b83037cce2a357da4562bfcc5b74d14 100644 (file)
@@ -20,12 +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
+       $(GETOPT) \
+       $(REGEX)
+endif
+
+if SILC_DIST_TOOLKIT
+include_HEADERS = getopt.h regex.h
+endif
 
-EXTRA_DIST = *.h
+EXTRA_DIST = *.c *.h
 
-INCLUDES = -I. -I.. -I../silccrypt -I../silcmath -I../silcske \
-       -I../silcsim -I../.. -I../../includes -I../silccore -I../silcutil \
-       -I../silcmath/gmp -I../trq
+include $(top_srcdir)/Makefile.defines.in