about summary refs log tree commit diff
path: root/configure
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2024-11-24 17:28:03 +0300
committerNakidai <nakidai@disroot.org>2024-11-24 17:28:03 +0300
commitebedf7a6c7487e9845ae36d55e6b5c461a243d0c (patch)
treeab647bfd76a486918164a3e292361abf601db323 /configure
parent366e82eda8ca21af78334e046eefa2846542aa63 (diff)
downloadlibhttpc-ebedf7a6c7487e9845ae36d55e6b5c461a243d0c.tar.gz
libhttpc-ebedf7a6c7487e9845ae36d55e6b5c461a243d0c.zip
Add install & uninstall recipies
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure36
1 files changed, 36 insertions, 0 deletions
diff --git a/configure b/configure
new file mode 100755
index 0000000..fab6a12
--- /dev/null
+++ b/configure
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+usage()
+{
+    echo "Use environment variables to pass values:
+    CC         - compiler (default: cc)
+    CFLAGS     - flags for compiler
+    LDFLAGS    - flags for linker
+    DESTDIR    - path to make install (default: /usr/local)"
+    exit 1
+}
+
+while test $# -gt 0; do
+    case "$1" in
+        -h) usage
+            ;;
+        --help) usage
+            ;;
+    esac
+    shift
+done
+
+CC=${CC:-cc}
+CFLAGS=${CFLAGS:-}
+LDFLAGS=${LDFLAGS:-}
+DESTDIR=${DESTDIR:-/usr/local}
+
+echo "Configuration:
+    Compiler: $CC
+    CFLAGS: $CFLAGS
+    LDFLAGS: $LDFLAGS
+    DESTDIR: $DESTDIR"
+
+echo "
+DESTDIR=$DESTDIR
+" > config.mk