summaryrefslogtreecommitdiff
path: root/rhnop-server/configure
diff options
context:
space:
mode:
Diffstat (limited to 'rhnop-server/configure')
-rwxr-xr-xrhnop-server/configure32
1 files changed, 32 insertions, 0 deletions
diff --git a/rhnop-server/configure b/rhnop-server/configure
index 30145f2..0b0aa09 100755
--- a/rhnop-server/configure
+++ b/rhnop-server/configure
@@ -32,6 +32,7 @@ LUA=''
PREFIX='/usr/local'
BINDIR=''
ETCDIR=''
+LIBDIR=''
print_usage() {
echo "configure --help print this"
@@ -39,6 +40,7 @@ print_usage() {
echo " --prefix=<PREFIX> the installation prefix (default: /usr/local)"
echo " --bindir=<DIR> the path to the bin directory (default: $PREFIX/bin)"
echo " --sysconfdir=<DIR> the path to the system configuration directory (default: $PREFIX/etc)"
+ echo " --libdir=<DIR> the path to the lua library directory (default: $PREFIX/lib/rhnop-server)"
echo " --with-lua=<DIR> use this lua tree instead of system default"
}
@@ -57,6 +59,9 @@ do
--sysconfdir=*)
ETCDIR=${arg#--sysconfdir=}
;;
+ --libdir=*)
+ LIBDIR=${arg#--libdir=}
+ ;;
--with-lua=*)
LUA_DIR=${arg#--with-lua=}
;;
@@ -82,6 +87,7 @@ if [ -n "$ERRORS" ] && [ $EBUILD_COMPAT -ne 1 ]; then
exit 1
fi
+rm -f config.h
rm -f include.mk
case $TARGET in
Linux)
@@ -168,6 +174,10 @@ if [ -z "$ETCDIR" ]; then
ETCDIR=$PREFIX/etc
fi
+if [ -z "$LIBDIR" ]; then
+ LIBDIR=$PREFIX/lib/rhnop-server
+fi
+
cat > include.mk <<EOF
# this file was created automatically
# do not edit this file directly
@@ -185,6 +195,28 @@ INSTALL := install
PREFIX := '$PREFIX'
BINDIR := '$BINDIR'
ETCDIR := '$ETCDIR'
+LIBDIR := '$LIBDIR'
+EOF
+
+cat > config.h <<EOF
+/*
+ * nopsyncd version info
+ *
+ * this file was created automatically
+ * do not edit this file directly
+ * use ./configure instead
+ */
+
+#ifndef NOPSYNCD_config_h_INCLUDED
+#define NOPSYNCD_config_h_INCLUDED
+
+#define TARGET "$TARGET"
+#define PREFIX "$PREFIX"
+#define BINDIR "$BINDIR"
+#define ETCDIR "$ETCDIR"
+#define LIBDIR "$LIBDIR"
+
+#endif
EOF
exit 0