Move to three part version numbers.
[gedcom-parse.git] / configure.in
index 24f7f2f8156f2227b5348534bc8e58016175ea41..fcd0b25dc078e7b1463ffa1020efee70693318f5 100644 (file)
@@ -8,16 +8,18 @@ dnl Global variables
 NAME=gedcom-parse
 AC_SUBST(NAME)
 
-VERSION=0.17
+VERSION=0.20.0
 VERSION_MAJOR=`echo $VERSION | sed 's/\..*$//'`
 changequote(<<,>>)
-VERSION_MINOR=`echo $VERSION | sed 's/^[^\.]*\.//'`
+VERSION_MINOR=`echo $VERSION | sed 's/^[^\.]*\.//' | sed 's/\..*$//'`
+VERSION_PATCH=`echo $VERSION | sed 's/^[^\.]*\.[^\.]*\.//'`
 changequote([,])
 AC_SUBST(VERSION_MAJOR)
 AC_SUBST(VERSION_MINOR)
+AC_SUBST(VERSION_PATCH)
 AC_SUBST(VERSION)
 
-LIBVERSION=0:7
+LIBVERSION=0:8
 AC_SUBST(LIBVERSION)
 
 SHELL=/bin/sh
@@ -98,6 +100,18 @@ point to an existing installation of that library (see README)
   ])
 fi
 
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+  
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/lib; then ICONV_LIBPATH="$ICONV_LIBPATH -L$dir/lib"; fi
+    done
+
+  ICONV_PATH=`echo "$withval" | tr : '/bin:'`
+  ICONV_PATH="$ICONV_PATH/bin"
+fi
+AC_SUBST(ICONV_PATH)
+
 AC_MSG_CHECKING(for location of iconv)
 if test "$am_cv_lib_iconv" = yes; then
   AC_MSG_RESULT(libiconv)
@@ -122,8 +136,14 @@ library (see README).
   ])
 fi
 
+case "$host_os" in
+ darwin*) # Hack to get correct locale_charset() function
+          LDFLAGS="$ICONV_LIBPATH -liconv $LDFLAGS";;
+esac
+
 AC_OUTPUT(GNUmakefile
           Makefile
+         gedcom-config
          gedcom/Makefile
          gedcom/calendar/Makefile
          gom/Makefile