])
REGEX=no
+AC_CHECK_HEADER(pcreposix.h, AC_DEFINE(HAVE_PCREPOSIX_H, [], [define this if we have the <pcreposix.h> header file]))
+if test "x$ac_cv_header_pcreposix_h" = "xyes"; then
+ AC_DEFINE(HAVE_REGEX_H [], [define if we have any regex])
+ REGEX_EXTENDED=yes
+ REGEX_PCRE=yes
+ REGEX=yes
+ LIBS="$LIBS -lpcreposix"
+else
+
AC_CHECK_HEADER(regex.h, AC_DEFINE(HAVE_REGEX_H, [], [define this if we have the <regex.h> header file]))
if test "x$ac_cv_header_regex_h" = "xyes"; then
REGEX_EXTENDED=no
+ REGEX_PCRE=no
REGEX=yes
AC_EGREP_CPP(yes,
[#include <regex.h>
#endif
], [AC_DEFINE(HAVE_REG_EXTENDED, [], [define this if we have REG_EXTENDED (from <regex.h>)]) REGEX_EXTENDED=yes])
fi
+fi
+
AC_SUBST(REGEX)
+AC_SUBST(REGEX_PCRE)
AC_SUBST(REGEX_EXTENDED)
dnl #
# include <malloc.h>
#endif
+#ifdef HAVE_PCREPOSIX_H
+# include <pcreposix.h>
+#else
#ifdef HAVE_REGEX_H
# include <regex.h>
#endif
+#endif
static const char *months[] = {
"jan", "feb", "mar", "apr", "may", "jun",
#include <ctype.h>
+#ifdef HAVE_PCREPOSIX_H
+#include <pcreposix.h>
+#else
#ifdef HAVE_REGEX_H
#include <regex.h>
#define REG_NOSUB (0)
#endif
#endif
+#endif
#ifdef WITH_UNLANG
radlog(L_INFO, "PARTICULAR PURPOSE.\n");
radlog(L_INFO, "You may redistribute copies of FreeRADIUS under the terms of the\n");
radlog(L_INFO, "GNU General Public License v2.\n");
+ radlog(L_INFO, "\n");
+ radlog(L_INFO, "Compilation options:\n");
+#ifdef HAVE_PCREPOSIX_H
+ radlog(L_INFO, "Regex flavour: PCRE\n");
+#else
+#ifdef HAVE_REGEX_H
+ radlog(L_INFO, "Regex flavour: Posix\n");
+#else
+ radlog(L_INFO, "Regex flavour: none\n");
+#endif
+#endif
+
fflush(NULL);
}
#include <ctype.h>
#include <fcntl.h>
+#ifdef HAVE_PCREPOSIX_H
+#include <pcreposix.h>
+#else
#ifdef HAVE_REGEX_H
#include <regex.h>
#define REG_ICASE (0)
#endif
#endif
+#endif
static rbtree_t *realms_byname = NULL;
#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/rad_assert.h>
+#ifdef HAVE_PCREPOSIX_H
+#include <pcreposix.h>
+#else
#ifdef HAVE_REGEX_H
# include <regex.h>
#define REG_NOSUB (0)
#endif
#endif
+#endif
struct cmp {
unsigned int attribute;