[ekg2-devel] configure.ac

Wiesław Ochmiński wiechu w wiechu.com
Pią, 29 Lut 2008, 09:39:49 CET


Kłaniam!

Z wczorajszej rozmowy na !ekg2:

22:56:28 <@wiechu> darkjames: Fajnie by było, jakby na koniec działania
	 autogen.sh było napisane, co będzie kompilowane (to jest) i
	 czego nie będzie.
22:56:59 <@darkjames> wiechu, to jak bedziesz to ogladac, to /me chce kolorki.
22:57:26 <@darkjames> nazwa pluginu w jendym kolorku.
22:57:29 <@darkjames> opcje plugina w drugim.


    Pozdrawiam,
	W.
-- 
 Wiesław Ochmiński, Polska Północna, Malbork.
-------------- następna część ---------
Index: configure.ac
===================================================================
--- configure.ac	(wersja 3822)
+++ configure.ac	(kopia robocza)
@@ -529,150 +529,194 @@
  
 AC_OUTPUT
 
+#
+# set variables for cEcho
+#
+if which tput >/dev/null 2>&1; then
+	clr_r=$(tput sgr0;tput setaf 1)
+	clr_g=$(tput sgr0;tput setaf 2)
+	clr_y=$(tput sgr0;tput setaf 3)
+	clr_b=$(tput sgr0;tput setaf 4)
+	clr_m=$(tput sgr0;tput setaf 5)
+	clr_c=$(tput sgr0;tput setaf 6)
+	clr_k=$(tput sgr0;tput setaf 7)
+	clr_R=$(tput bold;tput setaf 1)
+	clr_G=$(tput bold;tput setaf 2)
+	clr_Y=$(tput bold;tput setaf 3)
+	clr_B=$(tput bold;tput setaf 4)
+	clr_M=$(tput bold;tput setaf 5)
+	clr_C=$(tput bold;tput setaf 6)
+	clr_K=$(tput bold;tput setaf 7)
+	clr_0=$(tput sgr0)
+fi
+
+cEcho() {
+	for i in "$@"; do
+		text=eval echo -ne "$i"|sed "
+		    s/%r/$clr_r/g;
+		    s/%g/$clr_g/g;
+		    s/%y/$clr_y/g;
+		    s/%b/$clr_b/g;
+		    s/%m/$clr_m/g;
+		    s/%c/$clr_c/g;
+		    s/%k/$clr_k/g;
+		    s/%R/$clr_R/g;
+		    s/%G/$clr_G/g;
+		    s/%Y/$clr_Y/g;
+		    s/%B/$clr_B/g;
+		    s/%M/$clr_M/g;
+		    s/%C/$clr_C/g;
+		    s/%K/$clr_K/g;
+		    s/%0/$clr_0/g";
+		echo -ne "$text"
+	done
+	echo -ne "${clr_0}"; # set default colour
+}
+
 echo
-echo "configured options: "
+cEcho "%Gconfigured options: \n"
 
-echo "CFLAGS: $CFLAGS"
-echo "EXTRA CFLAGS FOR PLUGINS: $C_FVISIBILITY"
-echo "LDFLAGS: $LDFLAGS"
-echo "LIBS: $DLLIB $LIBS"
-echo "PLUGINS: "
+cEcho "%BCFLAGS%0: $CFLAGS\n"
+cEcho "%BEXTRA CFLAGS FOR PLUGINS%0: $C_FVISIBILITY\n"
+cEcho "%BLDFLAGS%0: $LDFLAGS\n"
+cEcho "%BLIBS%0: $DLLIB $LIBS\n"
+cEcho "%BPLUGINS%0: \n"
 # - UI PLUGINS
-echo -en " - Interface:\t "
+cEcho "%G - Interface:\t "
 	if test "x$have_ncurses" = "xyes"; then
-		echo -n "ncurses "
+		cEcho "%gncurses "
 
 		if test "x$have_aspell" = "xyes"; then
-		        echo -n "(with aspell) "
+		        cEcho "%c(with aspell) "
 		fi
 	fi
 
 	if test "x$have_gtk" = "xyes"; then
-	        echo -n "gtk "
+	        cEcho "%ggtk "
 	fi
 
 	if test "x$have_readline" = "xyes"; then
-		echo -n "readline "
+		cEcho "%greadline "
 	fi
 echo ""
 
 # - PROTOCOL PLUGINS
-echo -en " - Protocols:\t irc polchat xmsg "
+cEcho "%G - Protocols:\t %girc polchat xmsg "
 	if test "x$have_expat" = "xyes"; then
-		echo -n "feed jabber "
+		cEcho "%gfeed jabber "
 
 		if test "x$jabber_have_gnutls" = "xyes"; then
-			echo -n "(with ssl support in -lgnutls) "
+			cEcho "%c(with ssl support in -lgnutls) "
 		fi
 
 		if test "x$jabber_have_openssl" = "xyes"; then
-			echo -n "(with ssl support in -lssl) "
+			cEcho "%c(with ssl support in -lssl) "
 		fi
 	fi
 
 	if test "x$have_libgadu" = "xyes"; then
-		echo -n "gg "
+		cEcho "%ggg "
 
 		if test "x$have_pthread" = "xyes"; then
-			echo -n "(with pthread resolver) "
+			cEcho "%c(with pthread resolver) "
 		fi
 	fi 
 echo ""
 
 # - LOGGING PLUGINS
-echo -en " - Logging:\t "
-	echo -n "logs "
+cEcho "%G - Logging:\t "
+	cEcho "%glogs "
 	if test "x$have_zlib" = "xyes"; then
-		echo -n "(with support for zlib compression) "
+		cEcho "%c(with support for zlib compression) "
 	fi
 
 	if test "x$have_sqlite" = "xyes"; then
-		echo -n "logsqlite "
+		cEcho "%glogsqlite "
 	elif test "x$have_sqlite3" = "xyes"; then
-		echo -n "logsqlite (using sqlite3) "
+		cEcho "%glogsqlite %c(using sqlite3) "
 	fi
 
 	if test "x$have_logsoracle" = "xyes"; then
-		echo -n "logsoracle "
+		cEcho "%glogsoracle "
 	fi
 echo ""
 
 # - AUDIO PLUGINS
-echo -en " - Audio:\t pcm "
+cEcho "%G - Audio:\t %gpcm "
 	if test "x$have_libgsm" = "xyes"; then
-		echo -n "libgsm "
+		cEcho "%glibgsm "
 	fi
 echo ""
 
 # - ENCRYPTION PLUGINS
-echo -en " - Encryption:\t rot13 "
+cEcho "%G - Encryption:\t %grot13 "
 	if test "x$have_openssl" = "xyes"; then
-		echo -n "sim "
+		cEcho "%gsim "
 	fi
 
 	if test "x$have_gpg" = "xyes"; then
-		echo -n "gpg "
+		cEcho "%ggpg "
 	fi
 echo ""
 
 # - SCRIPTING PLUGINS
-echo -en " - Scripting:\t "
+cEcho "%G - Scripting:\t "
 	if test "x$have_python" = "xyes"; then
-		echo -n "python "
+		cEcho "%gpython "
 	fi
 
 	if test "x$have_perl" = "xyes"; then
-		echo -n "perl "
+		cEcho "%gperl "
 	fi
 
 	if test "x$have_ruby" = "xyes"; then
-		echo -n "ruby "
+		cEcho "%gruby "
 	fi
 echo ""
 
 # - MISC PLUGINS
-echo -en " - Misc:\t autoresponder jogger mail rc sms "
+cEcho "%G - Misc:\t %gautoresponder jogger mail rc sms "
 	if test "x$have_ioctld_includes" = "xyes"; then
-	 	echo -n "ioctld "
+	 	cEcho "%gioctld "
 	fi
 
 	if test "x$have_libxosd" = "xyes"; then
-		echo -n "xosd "
+		cEcho "%gxosd "
 	fi
 echo ""
 
 #########################
 echo ""
 
-echo -en " - NLS system:\t "
+cEcho "%G - NLS system:\t "
 if test "$USE_NLS" = "yes"; then
-	echo "en pl"
+	cEcho "%gen pl\n"
 else 
-	echo "disabled, only en"
+	cEcho "%rdisabled, only en\n"
 fi
 
 if test "x$have_libgadu" = "xyes"; then
-	echo -en " - GG Tokens:\t saving to file"
+	cEcho "%G - GG Tokens:\t %gsaving to file"
 
 	if test "x$have_libjpeg" = "xyes"; then
-	        echo -n ", JPEG OCR (using: -ljpeg)"
+	        cEcho ", %gJPEG OCR %c(using: -ljpeg)"
 	fi
 
 	if test "x$have_gif" = "xyes"; then
-		echo -n ", GIF OCR (using: $GG_TOKENGIF_LIBS)"
+		cEcho ", %gGIF OCR %c(using: $GG_TOKENGIF_LIBS)"
 	fi
 	echo ""
 fi
 
 if test "x$have_ncurses" = "xyes"; then
-	echo -e " - Mouse support:in $mouse_lib"
+	cEcho "%G - Mouse support:%gin $mouse_lib\n"
 fi
 
-echo -en " - Charset support:\t "
+cEcho "%G - Charset support:\t "
 	if test "x$enable_unicode" = "xyes"; then
-	        echo "utf-8&ansi (EXPERIMENTAL)"
+	        cEcho "%gutf-8&ansi (EXPERIMENTAL)\n"
 		echo "*****************************************************************************************************"
-		echo "WARNING: USING THE RESULTING EKG2 BINARY IN A NON-UTF-8 (ASCII or LATIN) TERMINAL IS CURRENTLY"
+		cEcho "%RWARNING%0: USING THE RESULTING EKG2 BINARY IN A NON-UTF-8 (ASCII or LATIN) TERMINAL IS CURRENTLY\n"
 		echo "NOT SUPPORTED WHEN BUILT WITH GCC 4.x OR LATER."
 		echo "This is due to a known bug in the ncurses UI module - a symptom is ekg2 going into AN INFINITE LOOP."
 		echo "Workarounds:"
@@ -687,23 +731,33 @@
 		echo "******************************************************************************************************"
 		echo "AND ENJOY USING EKG2-UNICODE"
 	else
-	        echo "iso-8859-2"
+	        cEcho "%giso-8859-2\n"
 	fi
 
-echo -en " - Plugins:\t "
+cEcho "%G - Plugins:\t "
 	if test "x$enable_static" = "xyes"; then
-		echo "as static libs"
+		cEcho "%gas static libs"
 	else
-	 	echo "as shared libs"
+	 	cEcho "%gas shared libs"
 	fi
  
 echo 
 if test "x$am_cv_func_iconv" != "xyes"; then
-	echo "******************"
-	echo "* BIG FAT WARNING"
-	echo "* EKG2 will be compiled without iconv support. This means most charset"
-	echo "* conversion magic won't work. Jabber would work only on UTF-8 systems, and GG"
-	echo "* only on UTF-8, ISO-8859-2 or CP1250 ones. If you want something more, get"
-	echo "* yourself some iconv. Else, have fun."
-	echo "******************"
+	cEcho "%R******************\n"\
+	      "%R* %RBIG FAT WARNING\n"\
+	      "%R* %rEKG2 will be compiled without iconv support. This means most charset\n"\
+	      "%R* %rconversion magic won't work. Jabber would work only on UTF-8 systems, and GG\n"\
+	      "%R* %ronly on UTF-8, ISO-8859-2 or CP1250 ones. If you want something more, get\n"\
+	      "%R* %ryourself some iconv. Else, have fun.\n"\
+	      "%R******************\n"
 fi
+cEcho "\n============================================================\n";
+cEcho "%R - Without:\t "
+for p in aspell expat gif gpg gtk ioctld_includes libgadu libgadu libgsm libjpeg libxosd logsoracle ncurses ncurses openssl perl pthread python readline ruby sqlite sqlite3 zlib; do
+	eval a=\$have_$p;
+	if test "x$a" != "xyes"; then
+	    cEcho "%r$p "
+	fi
+done
+echo ""
+


Więcej informacji o liście dyskusyjnej ekg2-devel