- Minor change to ${top} stuff to fix a possible
authorRoman Bogorodskiy <mirrorbox@users.sourceforge.net>
Sat, 25 Mar 2006 14:28:40 +0000 (14:28 +0000)
committerRoman Bogorodskiy <mirrorbox@users.sourceforge.net>
Sat, 25 Mar 2006 14:28:40 +0000 (14:28 +0000)
  race condition (Petr Holub)
- Make autogen.sh a little bit more configurable.
  Now it calls 'automake', 'autoconf' etc by default.
  To match your disto name conventions for autotools,
  you can run it like:
  "AUTOCONF=autoconf-2.59 AUTOMAKE=automake18 ./autogen.sh"

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@610 7f574dfc-610e-0410-a909-a81674777703

autogen.sh
src/freebsd.c

index 18808bb..3067c03 100755 (executable)
@@ -1,16 +1,14 @@
 #!/bin/sh
 # $Id$
 
-if [ `uname -s` = FreeBSD ]; then
-       aclocal19
-       libtoolize15 --force
-       autoheader259
-       automake19 -a
-       autoconf259
-else
-       aclocal-1.9
-       libtoolize --force
-       autoheader-2.59
-       automake-1.9 -a
-       autoconf-2.59
-fi
+AUTOCONF=${AUTOCONF:-autoconf}
+AUTOMAKE=${AUTOMAKE:-automake}
+ACLOCAL=${ACLOCAL:-aclocal}
+AUTOHEADER=${AUTOHEADER:-autoheader}
+LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
+
+$ACLOCAL
+$LIBTOOLIZE --force
+$AUTOHEADER
+$AUTOMAKE -a
+$AUTOCONF
index 8786af8..5265065 100644 (file)
@@ -612,11 +612,11 @@ proc_find_top(struct process **cpu, struct process **mem)
                tmp->name = strdup(processes[i].name);
 
                ttmp = mem[i];
+               mem[i] = tmp;
                if (ttmp != NULL) {
                        free(ttmp->name);
                        free(ttmp);
                }
-               mem[i] = tmp;
        }
 
        qsort(processes, j - 1, sizeof (struct process), comparecpu);
@@ -630,11 +630,11 @@ proc_find_top(struct process **cpu, struct process **mem)
                tmp->name = strdup(processes[i].name);
 
                ttmp = cpu[i];
+               cpu[i] = tmp;
                if (ttmp != NULL) {
                        free(ttmp->name);
                        free(ttmp);
                }
-               cpu[i] = tmp;
        }
 
 #if defined(FREEBSD_DEBUG)