samba.configure-for-libs.patch 2.58 KB
Newer Older
1
diff -Naur samba-4.0.0alpha6.orig/lib/talloc/autogen.sh samba-4.0.0alpha6/lib/talloc/autogen.sh
2 3 4
--- samba-4.0.0alpha6.orig/lib/talloc/autogen.sh	2009-02-03 11:09:21.000000000 +0700
+++ samba-4.0.0alpha6/lib/talloc/autogen.sh	2009-02-03 11:13:03.000000000 +0700
@@ -1,5 +1,16 @@
5 6 7 8 9 10 11 12 13
 #!/bin/sh
 
+ARGV0=$0
+
+# Allow invocation from a separate build directory; in that case, we change
+# to the source directory to run the auto*, then change back before running
+# configure
+srcdir=`dirname $ARGV0`
+test -z "$srcdir" && srcdir=.
14 15 16
+
+ORIGDIR=`pwd`
+cd $srcdir
17 18 19 20
+
 rm -rf autom4te.cache
 rm -f configure config.h.in
 
21
@@ -9,6 +20,8 @@
22 23 24 25 26 27 28 29 30 31 32
 
 rm -rf autom4te.cache
 
-echo "Now run ./configure and then make."
-exit 0
+cd "$ORIGDIR" || exit 1
+
+$srcdir/configure ${1+"$@"} && \
+	echo "Now type \`make' to compile." || exit 1
 
diff -Naur samba-4.0.0alpha6.orig/lib/tdb/autogen.sh samba-4.0.0alpha6/lib/tdb/autogen.sh
33 34 35
--- samba-4.0.0alpha6.orig/lib/tdb/autogen.sh	2009-02-03 11:09:27.000000000 +0700
+++ samba-4.0.0alpha6/lib/tdb/autogen.sh	2009-02-03 11:13:45.000000000 +0700
@@ -1,5 +1,16 @@
36 37 38 39 40 41 42 43 44
 #!/bin/sh
 
+ARGV0=$0
+
+# Allow invocation from a separate build directory; in that case, we change
+# to the source directory to run the auto*, then change back before running
+# configure
+srcdir=`dirname $ARGV0`
+test -z "$srcdir" && srcdir=.
45 46 47
+
+ORIGDIR=`pwd`
+cd $srcdir
48 49 50 51
+
 rm -rf autom4te.cache
 rm -f configure config.h.in
 
52
@@ -9,6 +20,8 @@
53 54 55 56 57 58 59 60 61 62 63
 
 rm -rf autom4te.cache
 
-echo "Now run ./configure and then make."
-exit 0
+cd "$ORIGDIR" || exit 1
+
+$srcdir/configure ${1+"$@"} && \
+	echo "Now type \`make' to compile." || exit 1
 
diff -Naur samba-4.0.0alpha6.orig/lib/tevent/autogen.sh samba-4.0.0alpha6/lib/tevent/autogen.sh
64 65 66
--- samba-4.0.0alpha6.orig/lib/tevent/autogen.sh	2009-02-03 11:09:37.000000000 +0700
+++ samba-4.0.0alpha6/lib/tevent/autogen.sh	2009-02-03 11:14:06.000000000 +0700
@@ -1,14 +1,27 @@
67 68 69 70 71 72 73 74 75
 #!/bin/sh
 
+ARGV0=$0
+
+# Allow invocation from a separate build directory; in that case, we change
+# to the source directory to run the auto*, then change back before running
+# configure
+srcdir=`dirname $ARGV0`
+test -z "$srcdir" && srcdir=.
76 77 78
+
+ORIGDIR=`pwd`
+cd $srcdir
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
+
 rm -rf autom4te.cache
 rm -f configure config.h.in
 
-IPATHS="-I libreplace -I lib/replace -I ../libreplace -I ../replace -I ../../../lib/replace"
+IPATHS="-I libreplace -I lib/replace -I ../libreplace -I ../replace"
 autoconf $IPATHS || exit 1
 autoheader $IPATHS || exit 1
 
 rm -rf autom4te.cache
 
-echo "Now run ./configure and then make."
-exit 0
+cd "$ORIGDIR" || exit 1
+
+$srcdir/configure ${1+"$@"} && \
+	echo "Now type \`make' to compile." || exit 1