]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
easier to compile on windows.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 19 Mar 2009 14:24:19 +0000 (14:24 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 19 Mar 2009 14:24:19 +0000 (14:24 +0000)
git-svn-id: file:///svn/unbound/trunk@1538 be551aaa-1e26-0410-a405-d3ace91eadb9

configure
configure.ac
doc/Changelog
makedist.sh
winrc/README.txt

index 2d468ea48a651311caa84c8e492b4f5ad4157218..b093257791fd5266f1a38c45fb8dd4eabf32322e 100755 (executable)
--- a/configure
+++ b/configure
@@ -2652,10 +2652,18 @@ case "$prefix" in
         ;;
 esac
 
+# are we on MinGW?
+if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
+else on_mingw="no"; fi
+
 #
 # Determine configuration file
 # the eval is to evaluate shell expansion twice
-ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
+if test $on_mingw = "no"; then
+  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
+else
+  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
+fi
 
 # Check whether --with-conf_file or --without-conf_file was given.
 if test "${with_conf_file+set}" = set; then
@@ -2678,7 +2686,12 @@ if test "${with_run_dir+set}" = set; then
   withval="$with_run_dir"
   UNBOUND_RUN_DIR="$withval"
 else
-  UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
+  if test $on_mingw = no; then
+    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
+else
+    UNBOUND_RUN_DIR=""
+fi
+
 fi;
 
 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
@@ -2694,7 +2707,12 @@ if test "${with_chroot_dir+set}" = set; then
   withval="$with_chroot_dir"
   UNBOUND_CHROOT_DIR="$withval"
 else
-  UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
+  if test $on_mingw = no; then
+    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
+else
+    UNBOUND_CHROOT_DIR=""
+fi
+
 fi;
 
 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
@@ -2710,7 +2728,12 @@ if test "${with_pidfile+set}" = set; then
   withval="$with_pidfile"
   UNBOUND_PIDFILE="$withval"
 else
-  UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
+  if test $on_mingw = no; then
+    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
+else
+    UNBOUND_PIDFILE=""
+fi
+
 fi;
 
 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
@@ -5466,7 +5489,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5469 "configure"' > conftest.$ac_ext
+  echo '#line 5492 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -6722,11 +6745,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:6725: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6748: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:6729: \$? = $ac_status" >&5
+   echo "$as_me:6752: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7012,11 +7035,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7015: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7038: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7019: \$? = $ac_status" >&5
+   echo "$as_me:7042: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7116,11 +7139,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7119: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7142: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7123: \$? = $ac_status" >&5
+   echo "$as_me:7146: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9386,7 +9409,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9389 "configure"
+#line 9412 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9486,7 +9509,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9489 "configure"
+#line 9512 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11890,11 +11913,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11893: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11916: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11897: \$? = $ac_status" >&5
+   echo "$as_me:11920: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -11994,11 +12017,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11997: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12020: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12001: \$? = $ac_status" >&5
+   echo "$as_me:12024: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13558,11 +13581,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13561: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13584: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13565: \$? = $ac_status" >&5
+   echo "$as_me:13588: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -13662,11 +13685,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13665: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13688: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13669: \$? = $ac_status" >&5
+   echo "$as_me:13692: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -15834,11 +15857,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15837: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15860: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15841: \$? = $ac_status" >&5
+   echo "$as_me:15864: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16124,11 +16147,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16127: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16150: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16131: \$? = $ac_status" >&5
+   echo "$as_me:16154: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16228,11 +16251,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16231: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16254: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16235: \$? = $ac_status" >&5
+   echo "$as_me:16258: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
index 2b4de86dcb351257e8f73bea18d7afd96d1ec586..0f8123220dcd88983a1175b62be09249a4525cf2 100644 (file)
@@ -50,10 +50,18 @@ case "$prefix" in
         ;;
 esac
 
+# are we on MinGW?
+if uname -s 2>&1 | grep MINGW32 >/dev/null; then on_mingw="yes"
+else on_mingw="no"; fi
+
 #
 # Determine configuration file
 # the eval is to evaluate shell expansion twice
-ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
+if test $on_mingw = "no"; then
+  ub_conf_file=`eval echo "${sysconfdir}/unbound/unbound.conf"`
+else
+  ub_conf_file="C:\\Program Files\\Unbound\\service.conf"
+fi
 AC_ARG_WITH([conf_file],
         AC_HELP_STRING([--with-conf-file=path], 
        [Pathname to the Unbound configuration file]),
@@ -68,7 +76,12 @@ AC_ARG_WITH(run-dir,
     AC_HELP_STRING([--with-run-dir=path], 
     [set default directory to chdir to (by default dir part of cfg file)]), 
     UNBOUND_RUN_DIR="$withval", 
-    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`)
+if test $on_mingw = no; then
+    UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
+else
+    UNBOUND_RUN_DIR=""
+fi
+)
 AC_SUBST(UNBOUND_RUN_DIR)
 hdr_run="`echo $UNBOUND_RUN_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
 AC_DEFINE_UNQUOTED(RUN_DIR, ["$hdr_run"], [Directory to chdir to])
@@ -77,7 +90,12 @@ AC_ARG_WITH(chroot-dir,
     AC_HELP_STRING([--with-chroot-dir=path], 
     [set default directory to chroot to (by default same as run-dir)]), 
     UNBOUND_CHROOT_DIR="$withval", 
-    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR")
+if test $on_mingw = no; then
+    UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
+else
+    UNBOUND_CHROOT_DIR=""
+fi
+)
 AC_SUBST(UNBOUND_CHROOT_DIR)
 hdr_chroot="`echo $UNBOUND_CHROOT_DIR | sed -e 's/\\\\/\\\\\\\\/g'`"
 AC_DEFINE_UNQUOTED(CHROOT_DIR, ["$hdr_chroot"], [Directory to chroot to])
@@ -86,7 +104,12 @@ AC_ARG_WITH(pidfile,
     AC_HELP_STRING([--with-pidfile=filename], 
     [set default pathname to unbound pidfile (default run-dir/unbound.pid)]), 
     UNBOUND_PIDFILE="$withval", 
-    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid")
+if test $on_mingw = no; then
+    UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
+else
+    UNBOUND_PIDFILE=""
+fi
+)
 AC_SUBST(UNBOUND_PIDFILE)
 hdr_pid="`echo $UNBOUND_PIDFILE | sed -e 's/\\\\/\\\\\\\\/g'`"
 AC_DEFINE_UNQUOTED(PIDFILE, ["$hdr_pid"], [default pidfile location])
index d6de1e95eb183d970410c556288171ad6ce136bc..d858d3d01e0ad2942eb591c0c1f4af9b87a18400 100644 (file)
@@ -2,6 +2,7 @@
        - winrc/README.txt dos-format text file.
        - iana portlist updated.
        - use _beginthreadex() when available (performs stack alignment).
+       - defaults for windows baked into configure.ac (used if on mingw).
 
 18 March 2009: Wouter
        - Added tests, unknown algorithms become insecure. fallback works.
index 445f78358252f7d1a436f72dab1575c4a47d1f22..cdafaa1c305eda5c4e4d35890ef709f49e8e3f90 100755 (executable)
@@ -168,10 +168,8 @@ if [ "$DOWIN" = "yes" ]; then
     # procedure for making unbound installer on mingw. 
     info "Creating windows dist unbound $version"
     info "Calling configure"
-    echo './configure --enable-debug --enable-static-exe "--with-conf-file=C:\Program Files\Unbound\service.conf" --with-run-dir="" --with-pidfile="" --with-chroot-dir="" '"$*"
-    ./configure --enable-debug --enable-static-exe \
-       "--with-conf-file=C:\Program Files\Unbound\service.conf" \
-       --with-run-dir="" --with-pidfile="" --with-chroot-dir="" $* \
+    echo './configure --enable-debug --enable-static-exe '"$*"
+    ./configure --enable-debug --enable-static-exe $* \
        || error_cleanup "Could not configure"
     info "Calling make"
     make || error_cleanup "Could not make"
index 1b7cb3e102db13be69278a37bcc894ad668dbfe2..0aeef8600264ca5086310d2f7fc59c360aedd8d9 100644 (file)
@@ -65,13 +65,7 @@ $ cd /home/user
 $ tar xzvf unbound-xxx.tar.gz\r
 $ cd unbound-xxx\r
 $ ./configure --enable-static-exe --with-ldns=../ldns-xxx\r
-  "--with-conf-file=C:\Program Files\Unbound\service.conf"\r
-  --with-pidfile="" --with-chroot-dir=""\r
-Put the entire command on one line; it is paginated for display here.\r
 If you compiled openssl yourself, pass --with-ssl=../openssl-xxx too.\r
-You can set the defaults for the config file and working directory with \r
-options to configure (see ./configure -h).  Set chroot and pidfile to "".\r
-If you do not give these to configure you can edit the config file later.\r
 The configure options for libevent or threads are not applicable for \r
 windows, because builtin alternatives for the windows platform are used.\r
 $ make\r