Don't compile getopt*.c if the system provides getopt_long().
# Conflicts: # configure.ac # src/Makefile.am # src/tincd.c
This commit is contained in:
parent
c2726dae62
commit
9f0fb224a6
4 changed files with 26 additions and 6 deletions
|
|
@ -53,8 +53,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 \
|
||||
hash.c hash.h \
|
||||
have.h \
|
||||
|
|
@ -149,7 +147,22 @@ sptps_speed_SOURCES = \
|
|||
$(chacha_poly1305_SOURCES)
|
||||
|
||||
## Conditionally compile device drivers
|
||||
|
||||
|
||||
if !GETOPT
|
||||
tincd_SOURCES += \
|
||||
getopt.c getopt.h \
|
||||
getopt1.c
|
||||
tinc_SOURCES += \
|
||||
getopt.c getopt.h \
|
||||
getopt1.cendif
|
||||
sptps_test_SOURCES += \
|
||||
getopt.c getopt.h \
|
||||
getopt1.c
|
||||
sptps_keypair_SOURCES += \
|
||||
getopt.c getopt.h \
|
||||
getopt1.c
|
||||
endif
|
||||
|
||||
if LINUX
|
||||
tincd_SOURCES += linux/device.c
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -210,6 +210,12 @@
|
|||
#include <linux/if_tun.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include "getopt.h"
|
||||
#endif
|
||||
|
||||
#ifdef STATUS
|
||||
#undef STATUS
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -43,8 +43,6 @@
|
|||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#include <getopt.h>
|
||||
|
||||
#include "conf.h"
|
||||
#include "control.h"
|
||||
#include "crypto.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue