Re: [dwm] autoconf

2009-03-19 Thread bill lam
On Thu, 19 Mar 2009, Szabolcs Nagy wrote:
> hm probably "(c)" would be better there (and in the license)

(c) is not legalese, but spelling the whole word "copyright" and that
"c inside circle" symbol are.


ianal

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩094 杜審言  和晉陵路丞早春遊望
獨有宦遊人  偏驚物候新  雲霞出海曙  梅柳渡江春
淑氣催黃鳥  晴光轉綠蘋  忽聞歌古調  歸思欲霑巾



Re: [dwm] autoconf

2009-03-19 Thread hiro
Discuss this on the autoconf mailinglist, please...
We're all users and thus don't want to waste our time on this stuff from hell.



Re: [dwm] autoconf

2009-03-19 Thread Kurt Van Dijck
On Thu, Mar 19, 2009 at 06:09:33PM +0100, Nico Golde wrote:
> Hi,
> * Kurt Van Dijck  [2009-03-19 17:53]:
> > I'm in the process of cross-compiling dwm. I understand the idea of
> > having a config.mk for this, but it is not the easiest.
> > Since I had to fix some other packets too, I learned myself to setup a
> > minimal autoconf. This allows one to do:
> > ./configure && make && make install
> > 
> > Since dwm is distributed as a source package and not binary, I suspect
> > this can mean a serious improvement.
> 
> EPIC FAIL!
> Please read the FAQ: http://suckless.org/common/faq
I agree as a developer. a 'config.mk' approach, I understand.
I didn't even walk all FAQ's to get the job done :-)

As a user, I'm not that convinced. ./configure is easier to explain that
Makefile.

What I learned from the automake/autoconf docs is:
1) autoconf allows easy test, suitable for users.
2) ./configure script is big :-(
3) automake starts the real mess, using libtool etc.

I chose (for this & other projects) to stick to my own hand-crafted
Makefiles, supported by autoconf.
Some advantages of this approach:
* The core Makefile(.in) is still readable as developer.
* applying different --prefix, --host or DESTDIR gets easier.
* configuring is done as any other package.
* testing for necessary libraries gets easier on different platforms.
  Not all systems use glibc. MacOSX wants -liconv for iconv support,
   . Those are reasons I started with this 'limited' autoconf
  support.

Applying this to dwm didn't seem like huge job.

Kurt

> 
> Cheers
> Nico
> -- 
> Nico Golde - http://www.ngolde.de - n...@jabber.ccc.de - GPG: 0x73647CFF
> For security reasons, all text in this mail is double-rot13 encrypted.





Re: [dwm] autoconf

2009-03-19 Thread Kurt Van Dijck
On Thu, Mar 19, 2009 at 04:50:31PM +0100, Anselm R Garbe wrote:
> 
> 2009/3/19 Kurt Van Dijck :
> > I'm in the process of cross-compiling dwm. I understand the idea of
> > having a config.mk for this, but it is not the easiest.
> > Since I had to fix some other packets too, I learned myself to setup a
> > minimal autoconf. This allows one to do:
> > ./configure && make && make install
> 
> What does wc -l configure output after you run autoconf?
4195
> 
> Anyway, I can't see any reason why setting CC and possibly INCS and
> LIBS is more difficult than dealing with obscure arguments to
> configure, which also may require CFLAGS, LDFLAGS and CC in the
> environment if you intend to cross compiler -- OR some --target-XYZ
> and --host-XYZ arguments...
> 
> For which target platform do you attempt to compile dwm?
> 
> (I only did it for maemo so far, and there I didn't need to change
> anything at all, because my scratchbox setup was done properly).
I use ptxdist, and there, the environment is set up too. But I found
./configure easier to experiment with :-)
> 
> Kind regards,
> --Anselm
> 



Re: [dwm] autoconf

2009-03-19 Thread Szabolcs Nagy
On 3/19/09, Nico Golde  wrote:
> Please read the FAQ: http://suckless.org/common/faq

hm the 9fans link is dead, and neither 9fans[0] nor google[1] has the
entire thread archived

anyway, the main complaints:
- difficult to use by the user: --parameters
- difficult to use by the developper: m4, inconsistency, strange errors..
- huge, complex, slow, ugly..
- undebuggable huge generated files
- badly maintained, hacked together (see history[2])
- depends on perl and obscure gnu m4 features

[0] http://9fans.net/archive/2003/11
[1] http://groups.google.com/groups/search?q=configure+misery+9fans
[2] http://www.gnu.org/software/hello/manual/autoconf/History.html



Re: [dwm] autoconf

2009-03-19 Thread Nico Golde
Hi,
* Kurt Van Dijck  [2009-03-19 17:53]:
> I'm in the process of cross-compiling dwm. I understand the idea of
> having a config.mk for this, but it is not the easiest.
> Since I had to fix some other packets too, I learned myself to setup a
> minimal autoconf. This allows one to do:
> ./configure && make && make install
> 
> Since dwm is distributed as a source package and not binary, I suspect
> this can mean a serious improvement.

EPIC FAIL!
Please read the FAQ: http://suckless.org/common/faq

Cheers
Nico
-- 
Nico Golde - http://www.ngolde.de - n...@jabber.ccc.de - GPG: 0x73647CFF
For security reasons, all text in this mail is double-rot13 encrypted.


pgpRGpN7xmGIX.pgp
Description: PGP signature


Re: [dwm] autoconf

2009-03-19 Thread hiro
> hm probably "(c)" would be better there (and in the license)

utf-8 is great *especially* in the license:)



Re: [dwm] autoconf

2009-03-19 Thread Szabolcs Nagy
On 3/19/09, Anselm R Garbe  wrote:
> 2009/3/19 bill lam :
>>> - die("dwm-"VERSION", © 2006-2009 dwm engineers, see LICENSE
>>> for details\n");
>>
>> Not related to autoconfm but I notice the copyright sign is in utf-8.
>> If dwm is compiled in other locale, will it display properly when
>> run on that locale?
>
> No, but we expect all users are using UTF-8 nowadays -- and if not,
> they won't care either about that detail I suppose (like those OpenBSD
> users ;)).

hm probably "(c)" would be better there (and in the license)
this is the only non-ascii character in the code (luckily none of the
contributors has funny name..)

while expecting utf8 is reasonable it is not required by posix or the c standard
(local specific behaviour is always risky and who knows how many non
utf8 safe tools are out there..)



Re: [dwm] autoconf

2009-03-19 Thread Marc Andre Tanner

This is a (bad) joke, right?

--
 Marc Andre Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0



Re: [dwm] autoconf

2009-03-19 Thread Anselm R Garbe
2009/3/19 bill lam :
>> -             die("dwm-"VERSION", © 2006-2009 dwm engineers, see LICENSE for 
>> details\n");
>
> Not related to autoconfm but I notice the copyright sign is in utf-8.
> If dwm is compiled in other locale, will it display properly when
> run on that locale?

No, but we expect all users are using UTF-8 nowadays -- and if not,
they won't care either about that detail I suppose (like those OpenBSD
users ;)).

Kind regards,
--Anselm



Re: [dwm] autoconf

2009-03-19 Thread bill lam
> - die("dwm-"VERSION", © 2006-2009 dwm engineers, see LICENSE for 
> details\n");

Not related to autoconfm but I notice the copyright sign is in utf-8.
If dwm is compiled in other locale, will it display properly when
run on that locale?

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩223 沈佺期  古意呈補闕喬知之
盧家少婦鬱金香  海燕雙棲玳瑁梁  九月寒砧催木葉  十年征戍憶遼陽
白狼河北音書斷  丹鳳城南秋夜長  誰為含愁獨不見  更教明月照流黃



Re: [dwm] autoconf

2009-03-19 Thread pancake

O M G

Kurt Van Dijck wrote:

Hi,

I'm in the process of cross-compiling dwm. I understand the idea of
having a config.mk for this, but it is not the easiest.
Since I had to fix some other packets too, I learned myself to setup a
minimal autoconf. This allows one to do:
./configure && make && make install

Since dwm is distributed as a source package and not binary, I suspect
this can mean a serious improvement.

to use this, I had to:
* apply patch
* automake -ac (create missing scripts for autoconf/automake)
* autoconf
* ./configure 

I have 1 configurable option, to keep debugging symbols (interesting for 
cross-compile setup).


Kurt Van Dijck
-
Index: dwm-5.4.1/configure.ac
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ dwm-5.4.1/configure.ac  2009-03-17 11:40:38.0 +0100
@@ -0,0 +1,32 @@
+AC_PREREQ(2.61)
+AC_INIT([dwm],[5.4.1])
+#AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+#AC_CONFIG_HEADERS([config.h])
+AC_CANONICAL_HOST
+
+CFLAGS="$CFLAGS -std=c99 -pedantic -Wall -Os"
+CPPFLAGS="$CPPFLAGS -I."
+LDFLAGS="$LDFLAGS"
+
+dnl test compilers, tools
+AC_PROG_CC_C99
+AC_PROG_INSTALL
+AC_PROG_SED
+
+#AC_CHECK_HEADERS([stddef.h])
+#AC_HEADER_STDC
+
+AC_ARG_ENABLE(debug, AC_HELP_STRING(--enable-debug, [keep debugging info]))
+case x$enable_debug in
+   xyes)
+   CFLAGS="$CFLAGS -g3"
+   ;;
+   *)
+   CFLAGS="$CFLAGS -g0 -s"
+   ;;
+esac
+
+AC_SEARCH_LIBS(XOpenDisplay, X11, , AC_MSG_ERROR(library X11 not found))
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
Index: dwm-5.4.1/Makefile.in
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ dwm-5.4.1/Makefile.in   2009-03-17 11:45:22.0 +0100
@@ -0,0 +1,34 @@
+default:
+
+PREFIX = @prefix@
+VPATH  = @srcdir@
+
+CC = @CC@
+INSTALL= @INSTALL@
+SED= @SED@
+
+CFLAGS = @CFLAGS@
+CPPFLAGS= @CPPFLAGS@ @DEFS@
+LDFLAGS= @LDFLAGS@
+LDLIBS = @LIBS@
+
+config.h:
+   cp config.def.h config.h
+
+dwm.o: config.h
+
+dwm: dwm.o
+
+default: dwm
+
+dwm.1.ver: dwm.1
+   $(SED) -e "s,VERSION,@PACKAGE_VERSION@,g" < $< > $@
+default: dwm.1.ver
+
+clean:
+   rm -rf dwm.o dwm dwm.1.ver
+
+install: dwm dwm.1.ver
+   $(INSTALL) $(INSTOPTS) -D dwm $(DESTDIR)$(PREFIX)/bin/dwm
+   $(INSTALL) $(INSTOPTS) -D dwm.1.ver $(DESTDIR)$(PREFIX)/share/man/dwm.1
+
Index: dwm-5.4.1/dwm.c
===
--- dwm-5.4.1.orig/dwm.c2009-02-08 13:10:49.0 +0100
+++ dwm-5.4.1/dwm.c 2009-03-17 11:40:38.0 +0100
@@ -1627,7 +1627,7 @@
 void
 updatestatus() {
if(!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
-   strcpy(stext, "dwm-"VERSION);
+   strcpy(stext, PACKAGE_NAME"-"PACKAGE_VERSION);
drawbar();
 }
 
@@ -1708,7 +1708,7 @@

 int
 main(int argc, char *argv[]) {
if(argc == 2 && !strcmp("-v", argv[1]))
-   die("dwm-"VERSION", © 2006-2009 dwm engineers, see LICENSE for 
details\n");
+   die(PACKAGE_NAME"-"PACKAGE_VERSION", © 2006-2009 dwm engineers, see 
LICENSE for details\n");
else if(argc != 1)
die("usage: dwm [-v]\n");
 

  




Re: [dwm] autoconf

2009-03-19 Thread Anselm R Garbe
2009/3/19 Kurt Van Dijck :
> I'm in the process of cross-compiling dwm. I understand the idea of
> having a config.mk for this, but it is not the easiest.
> Since I had to fix some other packets too, I learned myself to setup a
> minimal autoconf. This allows one to do:
> ./configure && make && make install

What does wc -l configure output after you run autoconf?

Anyway, I can't see any reason why setting CC and possibly INCS and
LIBS is more difficult than dealing with obscure arguments to
configure, which also may require CFLAGS, LDFLAGS and CC in the
environment if you intend to cross compiler -- OR some --target-XYZ
and --host-XYZ arguments...

For which target platform do you attempt to compile dwm?

(I only did it for maemo so far, and there I didn't need to change
anything at all, because my scratchbox setup was done properly).

Kind regards,
--Anselm



[dwm] autoconf

2009-03-19 Thread Kurt Van Dijck
Hi,

I'm in the process of cross-compiling dwm. I understand the idea of
having a config.mk for this, but it is not the easiest.
Since I had to fix some other packets too, I learned myself to setup a
minimal autoconf. This allows one to do:
./configure && make && make install

Since dwm is distributed as a source package and not binary, I suspect
this can mean a serious improvement.

to use this, I had to:
* apply patch
* automake -ac (create missing scripts for autoconf/automake)
* autoconf
* ./configure 

I have 1 configurable option, to keep debugging symbols (interesting for 
cross-compile setup).

Kurt Van Dijck
-
Index: dwm-5.4.1/configure.ac
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ dwm-5.4.1/configure.ac  2009-03-17 11:40:38.0 +0100
@@ -0,0 +1,32 @@
+AC_PREREQ(2.61)
+AC_INIT([dwm],[5.4.1])
+#AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+#AC_CONFIG_HEADERS([config.h])
+AC_CANONICAL_HOST
+
+CFLAGS="$CFLAGS -std=c99 -pedantic -Wall -Os"
+CPPFLAGS="$CPPFLAGS -I."
+LDFLAGS="$LDFLAGS"
+
+dnl test compilers, tools
+AC_PROG_CC_C99
+AC_PROG_INSTALL
+AC_PROG_SED
+
+#AC_CHECK_HEADERS([stddef.h])
+#AC_HEADER_STDC
+
+AC_ARG_ENABLE(debug, AC_HELP_STRING(--enable-debug, [keep debugging info]))
+case x$enable_debug in
+   xyes)
+   CFLAGS="$CFLAGS -g3"
+   ;;
+   *)
+   CFLAGS="$CFLAGS -g0 -s"
+   ;;
+esac
+
+AC_SEARCH_LIBS(XOpenDisplay, X11, , AC_MSG_ERROR(library X11 not found))
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
Index: dwm-5.4.1/Makefile.in
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ dwm-5.4.1/Makefile.in   2009-03-17 11:45:22.0 +0100
@@ -0,0 +1,34 @@
+default:
+
+PREFIX = @prefix@
+VPATH  = @srcdir@
+
+CC = @CC@
+INSTALL= @INSTALL@
+SED= @SED@
+
+CFLAGS = @CFLAGS@
+CPPFLAGS= @CPPFLAGS@ @DEFS@
+LDFLAGS= @LDFLAGS@
+LDLIBS = @LIBS@
+
+config.h:
+   cp config.def.h config.h
+
+dwm.o: config.h
+
+dwm: dwm.o
+
+default: dwm
+
+dwm.1.ver: dwm.1
+   $(SED) -e "s,VERSION,@PACKAGE_VERSION@,g" < $< > $@
+default: dwm.1.ver
+
+clean:
+   rm -rf dwm.o dwm dwm.1.ver
+
+install: dwm dwm.1.ver
+   $(INSTALL) $(INSTOPTS) -D dwm $(DESTDIR)$(PREFIX)/bin/dwm
+   $(INSTALL) $(INSTOPTS) -D dwm.1.ver $(DESTDIR)$(PREFIX)/share/man/dwm.1
+
Index: dwm-5.4.1/dwm.c
===
--- dwm-5.4.1.orig/dwm.c2009-02-08 13:10:49.0 +0100
+++ dwm-5.4.1/dwm.c 2009-03-17 11:40:38.0 +0100
@@ -1627,7 +1627,7 @@
 void
 updatestatus() {
if(!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
-   strcpy(stext, "dwm-"VERSION);
+   strcpy(stext, PACKAGE_NAME"-"PACKAGE_VERSION);
drawbar();
 }
 
@@ -1708,7 +1708,7 @@
 int
 main(int argc, char *argv[]) {
if(argc == 2 && !strcmp("-v", argv[1]))
-   die("dwm-"VERSION", © 2006-2009 dwm engineers, see LICENSE for 
details\n");
+   die(PACKAGE_NAME"-"PACKAGE_VERSION", © 2006-2009 dwm engineers, 
see LICENSE for details\n");
else if(argc != 1)
die("usage: dwm [-v]\n");
 



Re: [dwm] [PATCH] dwm: remove unused variable ntiled in showhide()

2009-03-19 Thread Szabolcs Nagy
On 3/18/09, Marc Andre Tanner  wrote:
> There seems to be an unused variable in the showhide function.
>

heh
it was introduced for adjustborder, but then it wasn't removed..
http://code.suckless.org/hg/dwm/rev/8b7836a471f8
nice catch



[dwm] GSoC 2009, suckless.org has been rejected

2009-03-19 Thread Anselm R Garbe
Hi there,

I'm sorry to announce that we didn't make it this time.

I want to thank all people involved in the preparations for their efforts.

Hopefully, I will have a private chat tomorrow with Leslie to hear
about the reasons and what we can do better the next time.

The GSoC page is moved to

http://suckless.org/common/project_ideas

I will add an auto-redirection later today (currently it's an href)...

Kind regards,
--Anselm