Selaa lähdekoodia

-Update configure.in and configure
--Add pcre version on output.
--Add tmp bugfix for bugreport:6671, (look like a GNU vs BSD issue)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17159 54d463be-8e91-2dee-dedb-b68131a5f0ec

glighta 12 vuotta sitten
vanhempi
commit
a157945356
2 muutettua tiedostoa jossa 48 lisäystä ja 22 poistoa
  1. 40 18
      configure
  2. 8 4
      configure.in

+ 40 - 18
configure

@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 17060 .
+# From configure.in Revision: 17061 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.68.
 #
@@ -606,6 +606,7 @@ LIBOBJS
 DLLEXT
 PCRE_CFLAGS
 PCRE_LIBS
+PCRE_VERSION
 HAVE_PCRE
 MYSQL_LIBS
 MYSQL_CFLAGS
@@ -5877,7 +5878,6 @@ fi
 #
 # PCRE library (optional)
 #
-##TODO PCRE version
 PCRE_LIBS=""
 PCRE_CFLAGS=""
 
@@ -5885,14 +5885,17 @@ if test "$want_pcre" = "no" ; then
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: ignoring PCRE (optional)" >&5
 $as_echo "$as_me: ignoring PCRE (optional)" >&6;}
 else
+	host_os="`uname`"
+	if test "$host_os" = "FreeBSD" ; then PCRE_HOME="/usr/local"; fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: bsddebug, pcrehome=($PCRE_HOME)" >&5
+$as_echo "$as_me: bsddebug, pcrehome=($PCRE_HOME)" >&6;}
 	if test -z "$PCRE_HOME" ; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_study in -lpcre" >&5
-$as_echo_n "checking for pcre_study in -lpcre... " >&6; }
-if ${ac_cv_lib_pcre_pcre_study+:} false; then :
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcre_study" >&5
+$as_echo_n "checking for library containing pcre_study... " >&6; }
+if ${ac_cv_search_pcre_study+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpcre  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -5911,18 +5914,35 @@ return pcre_study ();
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pcre_pcre_study=yes
-else
-  ac_cv_lib_pcre_pcre_study=no
+for ac_lib in '' pcre; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_pcre_study=$ac_res
 fi
 rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+    conftest$ac_exeext
+  if ${ac_cv_search_pcre_study+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_pcre_study+:} false; then :
+
+else
+  ac_cv_search_pcre_study=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_study" >&5
-$as_echo "$ac_cv_lib_pcre_pcre_study" >&6; }
-if test "x$ac_cv_lib_pcre_pcre_study" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcre_study" >&5
+$as_echo "$ac_cv_search_pcre_study" >&6; }
+ac_res=$ac_cv_search_pcre_study
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
   HAVE_PCRE="yes"
 fi
 
@@ -5982,8 +6002,9 @@ fi
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PCRE library (optional)" >&5
 $as_echo_n "checking PCRE library (optional)... " >&6; }
 	if test "$HAVE_PCRE" = "yes" ; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+		PCRE_VERSION="`pcre-config --version`"
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($PCRE_VERSION)" >&5
+$as_echo "yes ($PCRE_VERSION)" >&6; }
 	else
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -6001,6 +6022,7 @@ fi
 
 
 
+
 #
 # Host specific stuff
 #

+ 8 - 4
configure.in

@@ -772,16 +772,18 @@ AC_SUBST([MYSQL_LIBS])
 
 #
 # PCRE library (optional)
-#
-##TODO PCRE version
+# 		
 PCRE_LIBS=""
 PCRE_CFLAGS=""
 
 if test "$want_pcre" = "no" ; then
 	AC_MSG_NOTICE([ignoring PCRE (optional)])
 else
+	host_os="`uname`"
+	if test "$host_os" = "FreeBSD" ; then PCRE_HOME="/usr/local"; fi
+	AC_MSG_NOTICE([bsddebug, pcrehome=($PCRE_HOME)])
 	if test -z "$PCRE_HOME" ; then
-		AC_CHECK_LIB([pcre], [pcre_study], [HAVE_PCRE="yes"], [])
+                AC_SEARCH_LIBS([pcre_study], [pcre], [HAVE_PCRE="yes"], [])
 		if test "$HAVE_PCRE" = "yes" ; then
 			PCRE_LIBS="-lpcre"
 		fi
@@ -798,7 +800,8 @@ else
 	fi
 	AC_MSG_CHECKING([PCRE library (optional)])
 	if test "$HAVE_PCRE" = "yes" ; then
-		AC_MSG_RESULT([yes])
+		PCRE_VERSION="`pcre-config --version`"
+		AC_MSG_RESULT([yes ($PCRE_VERSION)])
 	else
 		AC_MSG_RESULT([no])
 		if test "$require_pcre" = "yes" ; then
@@ -810,6 +813,7 @@ else
 fi
 
 AC_SUBST([HAVE_PCRE])
+AC_SUBST([PCRE_VERSION])
 AC_SUBST([PCRE_LIBS])
 AC_SUBST([PCRE_CFLAGS])