aboutsummaryrefslogtreecommitdiffstats
path: root/minilibx-bsd/configure
diff options
context:
space:
mode:
Diffstat (limited to 'minilibx-bsd/configure')
-rwxr-xr-xminilibx-bsd/configure94
1 files changed, 94 insertions, 0 deletions
diff --git a/minilibx-bsd/configure b/minilibx-bsd/configure
new file mode 100755
index 0000000..740f24a
--- /dev/null
+++ b/minilibx-bsd/configure
@@ -0,0 +1,94 @@
+#!/bin/sh
+
+
+if [ -n "$1" -a "$1" = "--help" ] ; then
+ echo "Usage : $0\n Auto-configure and make MinilibX"
+ exit
+fi
+
+
+conf_inc=NO
+
+for inc in \
+ /usr/X11/include \
+ /usr/X11R6/include \
+ /usr/X11R5/include \
+ /usr/X11R4/include \
+ \
+ /usr/include/X11 \
+ /usr/include/X11R6 \
+ /usr/include/X11R5 \
+ /usr/include/X11R4 \
+ \
+ /usr/local/X11/include \
+ /usr/local/X11R6/include \
+ /usr/local/X11R5/include \
+ /usr/local/X11R4/include \
+ \
+ /usr/local/include/X11 \
+ /usr/local/include/X11R6 \
+ /usr/local/include/X11R5 \
+ /usr/local/include/X11R4 \
+ \
+ /usr/X386/include \
+ /usr/x386/include \
+ /usr/XFree86/include/X11 \
+ \
+ /usr/include \
+ /usr/local/include \
+ /usr/athena/include \
+ /usr/local/x11r5/include \
+ /usr/lpp/Xamples/include \
+ \
+ /usr/openwin/include \
+ /usr/openwin/share/include
+ do
+ if [ -f "$inc/X11/Xlib.h" -a -f "$inc/X11/extensions/XShm.h" ]; then
+ conf_inc=$inc
+ break
+ fi
+ done
+
+
+if [ "$conf_inc" = "NO" ]; then
+ echo "Can't find a suitable X11 include directory."
+ exit
+else
+ echo "X11 include dir : $conf_inc"
+fi
+
+if [ -z "$HOSTTYPE" ]; then
+ conf_ht=`uname -s`
+else
+ conf_ht=$HOSTTYPE
+fi
+
+if [ -z "$conf_ht" ]; then
+ conf_docp=""
+else
+ conf_docp="do_cp"
+ echo "lib_$conf_ht generation"
+fi
+
+
+/bin/echo "INC=$conf_inc" > Makefile.gen
+/bin/echo "HT=$conf_ht" >> Makefile.gen
+/bin/echo "DOCP=$conf_docp" >> Makefile.gen
+cat Makefile.mk | grep -v %%%% >> Makefile.gen
+
+/bin/echo "INC=$conf_inc" > test/Makefile.gen
+/bin/echo "HT=$conf_ht" >> test/Makefile.gen
+/bin/echo "DOCP=$conf_docp" >> test/Makefile.gen
+cat test/Makefile.mk | grep -v %%%% >> test/Makefile.gen
+
+
+if [ -n "$1" -a "$1" = "clean" ] ; then
+ echo "Now make it clean."
+ gmake -f Makefile.gen clean
+ (cd test ; gmake -f Makefile.gen clean)
+ exit
+fi
+
+echo "Now make it."
+gmake -f Makefile.gen all
+(cd test ; gmake -f Makefile.gen all )