summaryrefslogtreecommitdiff
path: root/cleopatre/application/libalme/libalme-config
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/application/libalme/libalme-config')
-rwxr-xr-xcleopatre/application/libalme/libalme-config109
1 files changed, 109 insertions, 0 deletions
diff --git a/cleopatre/application/libalme/libalme-config b/cleopatre/application/libalme/libalme-config
new file mode 100755
index 0000000000..6e9424a777
--- /dev/null
+++ b/cleopatre/application/libalme/libalme-config
@@ -0,0 +1,109 @@
+#! /bin/sh
+
+# libalme-config
+# provides configuration info for libalme.
+
+# Copyright (C) 2013 MStar
+
+# Modeled after libpng-config.
+
+libdir=`dirname $0`
+includedir=${libdir}/inc
+libs="-lalme"
+all_libs="-lalme"
+I_opts="-I${includedir}"
+L_opts="-L${libdir}"
+R_opts=""
+cppflags=""
+ccopts=""
+ldopts="-Wl,-rpath-link=${libdir}"
+
+usage()
+{
+ cat <<EOF
+Usage: $0 [OPTION] ...
+
+Known values for OPTION are:
+
+ --libdir print path to directory containing library
+ --libs print library linking information
+ --ccopts print compiler options
+ --cppflags print pre-processor flags
+ --cflags print preprocessor flags, I_opts, and compiler options
+ --I_opts print "-I" include options
+ --L_opts print linker "-L" flags for dynamic linking
+ --R_opts print dynamic linker "-R" or "-rpath" flags
+ --ldopts print linker options
+ --ldflags print linker flags (ldopts, L_opts, R_opts, and libs)
+ --static revise subsequent outputs for static linking
+ --help print this help and exit
+EOF
+
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+
+ --help)
+ usage 0
+ ;;
+
+ --ccopts)
+ echo ${ccopts}
+ ;;
+
+ --cppflags)
+ echo ${cppflags}
+ ;;
+
+ --cflags)
+ echo ${I_opts} ${cppflags} ${ccopts}
+ ;;
+
+ --libdir)
+ echo ${libdir}
+ ;;
+
+ --libs)
+ echo ${libs}
+ ;;
+
+ --I_opts)
+ echo ${I_opts}
+ ;;
+
+ --L_opts)
+ echo ${L_opts}
+ ;;
+
+ --R_opts)
+ echo ${R_opts}
+ ;;
+
+ --ldopts)
+ echo ${ldopts}
+ ;;
+
+ --ldflags)
+ echo ${ldopts} ${L_opts} ${R_opts} ${libs}
+ ;;
+
+ --static)
+ R_opts=""
+ libs=${all_libs}
+ ;;
+
+ *)
+ usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+exit 0