summaryrefslogtreecommitdiff
path: root/src/configure
diff options
context:
space:
mode:
Diffstat (limited to 'src/configure')
-rwxr-xr-xsrc/configure33
1 files changed, 24 insertions, 9 deletions
diff --git a/src/configure b/src/configure
index 4b93d79..b90061f 100755
--- a/src/configure
+++ b/src/configure
@@ -1,30 +1,31 @@
#!/bin/sh
#
#
-# rhdropbox
+# dropnroll
#
-# Copyright (C) 2009 Christian Pointner <equinox@helsinki.at>
+# Copyright (C) 2009-2015 Christian Pointner <equinox@spreadspace.org>
#
-# This file is part of rhdropbox.
+# This file is part of dropnroll.
#
-# rhdropbox is free software: you can redistribute it and/or modify
+# dropnroll is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
-# rhdropbox is distributed in the hope that it will be useful,
+# dropnroll is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with rhdropbox. If not, see <http://www.gnu.org/licenses/>.
+# along with dropnroll. If not, see <http://www.gnu.org/licenses/>.
#
TARGET=`uname -s`
-
EBUILD_COMPAT=0
+USE_CLANG=0
+
CFLAGS='-g -O2'
LDFLAGS='-g -Wall -O2'
@@ -54,6 +55,9 @@ do
--target=*)
TARGET=${arg#--target=}
;;
+ --use-clang)
+ USE_CLANG=1
+ ;;
--prefix=*)
PREFIX=${arg#--prefix=}
;;
@@ -97,6 +101,17 @@ if [ -n "$ERRORS" ] && [ $EBUILD_COMPAT -ne 1 ]; then
exit 1
fi
+if [ $USE_CLANG -eq 0 ]; then
+ CFLAGS='-g -Wall -O2'
+ LDFLAGS='-g -Wall -O2'
+ COMPILER='gcc'
+else
+ CFLAGS='-g -O2'
+ LDFLAGS='-g -O2'
+ COMPILER='clang'
+fi
+
+rm -f version.h
rm -f include.mk
case $TARGET in
Linux)
@@ -129,13 +144,13 @@ if [ -z "$EXAMPLESDIR" ]; then
EXAMPLESDIR=$PREFIX/share/examples
fi
-cat >> include.mk <<EOF
+cat > include.mk <<EOF
# this file was created automatically
# do not edit this file directly
# use ./configure instead
TARGET := $TARGET
-CC := gcc
+CC := $COMPILER
CFLAGS := $CFLAGS
LDFLAGS := $LDFLAGS
INSTALL := install