Don't compile getopt*.c if the system provides getopt_long().
[tinc] / src / Makefile.am
index 937800d..a5a9692 100644 (file)
@@ -17,8 +17,6 @@ tincd_SOURCES = \
        fake-gai-errnos.h \
        fake-getaddrinfo.c fake-getaddrinfo.h \
        fake-getnameinfo.c fake-getnameinfo.h \
-       getopt.c getopt.h \
-       getopt1.c \
        graph.c graph.h \
        ipv4.h \
        ipv6.h \
@@ -40,6 +38,7 @@ tincd_SOURCES = \
        protocol_misc.c \
        protocol_key.c \
        protocol_subnet.c \
+       proxy.c proxy.h \
        raw_socket_device.c \
        route.c route.h \
        subnet.c subnet.h \
@@ -48,6 +47,12 @@ tincd_SOURCES = \
        xalloc.h \
        xmalloc.c
 
+if !GETOPT
+tincd_SOURCES += \
+       getopt.c getopt.h \
+       getopt1.c
+endif
+
 if LINUX
 tincd_SOURCES += linux/device.c
 endif