]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
helepr: ext_edirectory_userip_acl: add autotools code to bundle.
authorAmos Jeffries <amosjeffries@squid-cache.org>
Fri, 13 Aug 2010 05:53:22 +0000 (23:53 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Fri, 13 Aug 2010 05:53:22 +0000 (23:53 -0600)
12 files changed:
configure.in
helpers/external_acl/Makefile.am
helpers/external_acl/eDirectory_userip/Makefile [deleted file]
helpers/external_acl/eDirectory_userip/Makefile.am [new file with mode: 0644]
helpers/external_acl/eDirectory_userip/config.test [new file with mode: 0755]
helpers/external_acl/eDirectory_userip/edui_config.h [moved from helpers/external_acl/eDirectory_userip/config.h with 97% similarity]
helpers/external_acl/eDirectory_userip/edui_util.c [moved from helpers/external_acl/eDirectory_userip/util.c with 99% similarity]
helpers/external_acl/eDirectory_userip/edui_util.h [moved from helpers/external_acl/eDirectory_userip/util.h with 100% similarity]
helpers/external_acl/eDirectory_userip/iplookup.c
helpers/external_acl/eDirectory_userip/main.c
helpers/external_acl/eDirectory_userip/main.h
src/neighbors.cc

index d78f9759565db2b6d2d50dbee9fc582a8162328d..43eae54957d1f105bf2417d06c2d6e8e2b53af65 100644 (file)
@@ -3008,6 +3008,7 @@ AC_CONFIG_FILES([\
        helpers/negotiate_auth/SSPI/Makefile \
        helpers/external_acl/Makefile \
        helpers/external_acl/AD_group/Makefile \
+       helpers/external_acl/eDirectory_userip/Makefile \
        helpers/external_acl/file_userip/Makefile \
        helpers/external_acl/LDAP_group/Makefile \
        helpers/external_acl/LM_group/Makefile \
index 7144c8ceee31778d078e0d0ab59fd6907527a073..21235b56a55c7be3be58fe33944c8124198d8420 100644 (file)
@@ -1,2 +1,2 @@
-DIST_SUBDIRS   = AD_group file_userip LDAP_group LM_group session unix_group wbinfo_group
+DIST_SUBDIRS   = AD_group eDirectory_userip file_userip LDAP_group LM_group session unix_group wbinfo_group
 SUBDIRS                = $(EXTERNAL_ACL_HELPERS)
diff --git a/helpers/external_acl/eDirectory_userip/Makefile b/helpers/external_acl/eDirectory_userip/Makefile
deleted file mode 100644 (file)
index 5138829..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# squid_edir_iplookup - Copyright (C) 2009, 2010 Chad E. Naugle
-#
-#*******************************************************************************
-#
-# Makefile --
-#
-# Builds squid_edir_lookup when run.  PORTING NEEDED.
-#
-
-CC = gcc
-LD = gcc
-CFLAGS = -O2 -Wall -Wextra
-PROGNAME = squid_edir_iplookup
-UID = squid
-GID = nogroup
-OBJECTS = main.o iplookup.o util.o
-LIBS = -lldap -llber
-HEADERS = config.h main.h util.h iplookup.h
-
-all: ${PROGNAME}
-
-${PROGNAME}: ${OBJECTS}
-       ${LD} ${CFLAGS} -o ${PROGNAME} ${OBJECTS} ${LIBS}
-       chmod 0550 ${PROGNAME}
-       chown ${UID} ${PROGNAME}
-       chgrp ${GID} ${PROGNAME}
-
-clean:
-       rm -f *.o ${PROGNAME}
-
-install: ${PROGNAME}
-       cp ${PROGNAME} /usr/sbin
-
-main.o: ${HEADERS} main.c
-       ${CC} ${CFLAGS} -c main.c
-
-iplookup.o: ${HEADERS} iplookup.c
-       ${CC} ${CFLAGS} -c iplookup.c
-
-util.o: ${HEADERS} util.c
-       ${CC} ${CFLAGS} -c util.c
diff --git a/helpers/external_acl/eDirectory_userip/Makefile.am b/helpers/external_acl/eDirectory_userip/Makefile.am
new file mode 100644 (file)
index 0000000..4ff4d3a
--- /dev/null
@@ -0,0 +1,15 @@
+include $(top_srcdir)/src/Common.am
+
+libexec_PROGRAMS = ext_edirectory_userip_acl
+
+ext_edirectory_userip_acl_SOURCES = \
+       edui_config.h main.h edui_util.h iplookup.h \
+       main.c edui_util.c iplookup.c
+
+ext_edirectory_userip_acl_LDADD = \
+       $(COMPAT_LIB) \
+       $(LDAPLIB) \
+       $(LBERLIB) \
+       $(XTRA_LIBS)
+
+EXTRA_DIST = config.test README ISSUES INSTALL
diff --git a/helpers/external_acl/eDirectory_userip/config.test b/helpers/external_acl/eDirectory_userip/config.test
new file mode 100755 (executable)
index 0000000..1e690b2
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# AYJ: currently does not build portable
+exit 1
+
+if [ -f /usr/include/ldap.h ]; then
+       exit 0
+fi
+if [ -f /usr/include/winldap.h ]; then
+       exit 0
+fi
+exit 1
similarity index 97%
rename from helpers/external_acl/eDirectory_userip/config.h
rename to helpers/external_acl/eDirectory_userip/edui_config.h
index c3421e4239fc91014580094ca6b4a7735cdb9492..f8239cb17c5b94f0a151928bb0a0781d75c8c649 100644 (file)
@@ -29,7 +29,7 @@
 #define _HAVE_CONFIG_H
 
 /* Default program name */
-#define DEFAULT_PROGRAM_NAME   "squid_edir_iplookup"
+#define DEFAULT_PROGRAM_NAME   "ext_edirectory_userip_acl"
 
 /* Hostname or IP address of LDAP server, default is IPv4 localhost (127.0.0.1) */
 /* #define DEFAULT_LDAP_HOST */
similarity index 99%
rename from helpers/external_acl/eDirectory_userip/util.c
rename to helpers/external_acl/eDirectory_userip/edui_util.c
index ba8c5fe66c6e93399cc9156ffb9c905934287c79..97624d4f6c4f558da18673e16e34d61b5b032b30 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #include "main.h"
-#include "util.h"
+#include "edui_util.h"
 
 /* debug() -
  *
index 294b0cd4ec7f963987bc7b8819769c0bc45f6a12..a94fae55831a2e365e393382f54e88ef140d9f9d 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #include "main.h"
-#include "util.h"
+#include "edui_util.h"
 #include "iplookup.h"
 
 /* InitLDAP() - <ldap_t>
index ad757e1c5bf2447c61753317d60a939de407218e..07df10f97153e95d4ee7e10299b14422f7dc9432 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #include "main.h"
-#include "util.h"
+#include "edui_util.h"
 #include "iplookup.h"
 
 char *search_attrib[] = { "cn", "uid", "networkAddress", "groupMembership", NULL };
@@ -88,7 +88,7 @@ void InitConf()
     conf.mode = 0;
     conf.mode |= MODE_INIT;
 
-    /* Set defaults from config.h */
+    /* Set defaults from edui_config.h */
 #ifdef DEFAULT_BASE_DN
     strcpy(conf.basedn, DEFAULT_BASE_DN);
 #endif
index 9e11d71ec868143a0bcc467f6ff93cf0ec32b518..9764f7783ef92d4707fab2959f68dfab768b6a62 100644 (file)
 #ifndef _HAVE_MAIN_H
 #define _HAVE_MAIN_H
 
-#ifndef _HAVE_CONFIG_H
 #include "config.h"
-#endif
+#include "edui_config.h"
 
 #ifndef DEFAULT_PROGRAM_NAME
-#define DEFAULT_PROGRAM_NAME           "squid_edir_iplookup"
+#define DEFAULT_PROGRAM_NAME           "ext_edirectory_iuserp_acl"
 #endif
 
 /* Must ... include ... these ... */
index bca59bbb1951c58ac2936408fbb61f838cfe8fff..409bd29a75d19e7e8a6fcd8d14e962eeddcd81a7 100644 (file)
@@ -38,6 +38,7 @@
 #include "htcp.h"
 #include "HttpRequest.h"
 #include "ICP.h"
+#include "ip/tools.h"
 #include "MemObject.h"
 #include "PeerDigest.h"
 #include "PeerSelectState.h"