OSDN Git Service

Ver.1.4.21: Modify Makefile and install manual.
[opengate/opengate.git] / opengate / opengatesrv / Makefile
index bc8fa3d..8b89a43 100644 (file)
@@ -13,7 +13,13 @@ INSTALLDOCPATH = ${WWWTOP}${DOCDIR}${OPENGATEDIR}
 INSTALLCGIPATH = ${WWWTOP}${CGIDIR}${OPENGATEDIR}
 
 CFLAGS= -O4 -Wall
-LIBS = -lssl -lcrypto -lradius -lpam -lldap -llber -lezxml -L/usr/local/lib -L../ezxml
+
+.if exists(/usr/local/include/ldap.h)
+LIBS = -lssl -lcrypto -lradius -lpam -lezxml -L../ezxml -lldap -llber -L/usr/local/lib
+.else
+LIBS = -lssl -lcrypto -lradius -lpam -lezxml -L../ezxml
+.endif
+
 OBJS = utilities.o comm-auth.o comm-cgi.o watch-client.o comm-ipfw.o comm-ip6fw.c comm-arp.o comm-ndp.o error.o tcp_connect.o sock_ntop_host.o wrapper.o signal.o auth-pam.o auth-rad.o auth-pop3s.o comm-userdb.o get-param.o auth-ftps.o auth-ldap.o htmltemplate.o addr-convert.o get-mac.o ctrl-firewall.o ctrl-alarms.o
 MAINPROGO = main.o
 HDRS = opengatesrv.h