From 7f22d45d5f5aae7efbe9c58317fc8e0713aee7b5 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 14 Apr 2020 18:14:57 +0200 Subject: New lib --- minilibx-linux/configure | 94 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100755 minilibx-linux/configure (limited to 'minilibx-linux/configure') diff --git a/minilibx-linux/configure b/minilibx-linux/configure new file mode 100755 index 0000000..2f9b0be --- /dev/null +++ b/minilibx-linux/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." + make -f Makefile.gen clean + (cd test ; make -f Makefile.gen clean) + exit +fi + +echo "Now make it." +make -f Makefile.gen all +(cd test ; make -f Makefile.gen all ) -- cgit v1.2.3