summaryrefslogtreecommitdiffstats
path: root/test cases/common/230 external project/libfoo/configure
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/common/230 external project/libfoo/configure')
-rwxr-xr-xtest cases/common/230 external project/libfoo/configure44
1 files changed, 44 insertions, 0 deletions
diff --git a/test cases/common/230 external project/libfoo/configure b/test cases/common/230 external project/libfoo/configure
new file mode 100755
index 0000000..0e4aa72
--- /dev/null
+++ b/test cases/common/230 external project/libfoo/configure
@@ -0,0 +1,44 @@
+#! /bin/sh
+
+srcdir=$(dirname "$0")
+
+for i in "$@"
+do
+case $i in
+ --prefix=*)
+ PREFIX="${i#*=}"
+ shift
+ ;;
+ --libdir=*)
+ LIBDIR="${i#*=}"
+ shift
+ ;;
+ --includedir=*)
+ INCDIR="${i#*=}"
+ shift
+ ;;
+ --libext=*)
+ LIBEXT="${i#*=}"
+ shift
+ ;;
+ *)
+ shift
+ ;;
+esac
+done
+
+DEP_ARGS=$(pkg-config --cflags --libs somelib)
+
+cat > Makefile << EOL
+all: libfoo.$LIBEXT
+
+libfoo.$LIBEXT:
+ $CC "$srcdir/libfoo.c" -shared -fPIC $DEP_ARGS -o \$@
+
+install: libfoo.$LIBEXT
+ mkdir -p "\$(DESTDIR)$LIBDIR";
+ mkdir -p "\$(DESTDIR)$LIBDIR/pkgconfig";
+ mkdir -p "\$(DESTDIR)$INCDIR";
+ cp \$< "\$(DESTDIR)$LIBDIR";
+ cp "$srcdir/libfoo.h" "\$(DESTDIR)$INCDIR";
+EOL