summaryrefslogtreecommitdiff
path: root/src/protocol/configure
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-29 20:07:38 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-12-29 20:07:38 +0000
commitd6bb55476c9aa4771e2b7f24cee05325a1df4117 (patch)
treeed830d3c2c748f4c1ed6de25922461d701a805de /src/protocol/configure
parent0bb13ddf57c968db37a997851650d768641b3528 (diff)
Revived Autotools from the grave, although it'll need some tweaking to work alongside CMake now. (In other words, don't use this commit, I committed this so I don't have to re-add these files again if I screw something up.)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1876 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/configure')
-rwxr-xr-xsrc/protocol/configure60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/protocol/configure b/src/protocol/configure
new file mode 100755
index 000000000..63f522d38
--- /dev/null
+++ b/src/protocol/configure
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+oldpath=`pwd`
+
+if [ $1 ]; then
+ cd $1
+fi
+
+echo2 () {
+ $ECHO2 "$*$ECHO2SUF" # these are defined later
+}
+
+ECHO2SUF=''
+if [ "`echo -n a ; echo -n b`" = "ab" ] ; then
+ ECHO2='echo -n'
+elif [ "`echo 'a\c' ; echo 'b\c'`" = "ab" ] ; then
+ ECHO2='echo' ; ECHO2SUF='\c'
+elif [ "`printf 'a' 2>&1 ; printf 'b' 2>&1`" = "ab" ] ; then
+ ECHO2='printf "%s"'
+else
+ # oh well...
+ ECHO2='echo'
+fi
+export ECHO2 ECHO2SUF
+
+
+echo2 "SRCS=" > ./Makefile.inc
+FIRST=1
+for oldfile in `ls -1 *.c *.cpp`
+do
+ if [ "$FIRST" = 1 ] ; then
+ echo2 " "$oldfile >> ./Makefile.inc
+ else
+ echo "\\" >> ./Makefile.inc
+ echo2 " " $oldfile >> ./Makefile.inc
+ fi
+ FIRST=0
+done
+echo "" >> ./Makefile.inc
+
+echo2 "SUBS=" >> ./Makefile.inc
+FIRST=1
+for dir in *
+do
+ if [ -d $dir ] ; then
+ if [ -f $dir/Makefile ] ; then
+ if [ "$FIRST" = 1 ] ; then
+ echo2 " "$dir >> ./Makefile.inc
+ else
+ echo "\\" >> ./Makefile.inc
+ echo2 " " $dir >> ./Makefile.inc
+ fi
+ FIRST=0
+ fi
+ fi
+done
+
+cd $oldpath
+
+exit 0