mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
Half-assed fix to make autoconf bend
- this should make platform detection automagic - also fixes debian builds that broke in the meantime - fix osdep_darwin.c
This commit is contained in:
committed by
Carlos R. Mafra
parent
67a8a82670
commit
55959b4f7e
35
configure.ac
35
configure.ac
@@ -37,6 +37,41 @@ dnl AC_PROG_INSTALL -- already done by AM_INIT_AUTOMAKE
|
|||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
AC_PROG_GCC_TRADITIONAL
|
AC_PROG_GCC_TRADITIONAL
|
||||||
|
|
||||||
|
dnl Platform-specific Makefile setup
|
||||||
|
dnl ================================
|
||||||
|
|
||||||
|
case "${host}" in
|
||||||
|
*-*-linux*)
|
||||||
|
WM_OSDEP="linux"
|
||||||
|
;;
|
||||||
|
*-*-freebsd*)
|
||||||
|
WM_OSDEP="bsd"
|
||||||
|
CFLAGS="$CFLAGS -DFREEBSD"
|
||||||
|
;;
|
||||||
|
*-*-netbsd*)
|
||||||
|
WM_OSDEP="bsd"
|
||||||
|
CFLAGS="$CFLAGS -DNETBSD"
|
||||||
|
;;
|
||||||
|
*-*-openbsd*)
|
||||||
|
WM_OSDEP="bsd"
|
||||||
|
CFLAGS="$CFLAGS -DOPENBSD"
|
||||||
|
;;
|
||||||
|
*-*-dragonfly*)
|
||||||
|
WM_OSDEP="bsd"
|
||||||
|
CFLAGS="$CFLAGS -DDRAGONFLYBSD"
|
||||||
|
;;
|
||||||
|
*-apple-darwin*)
|
||||||
|
WM_OSDEP="darwin"
|
||||||
|
;;
|
||||||
|
*-*-solaris*)
|
||||||
|
WM_OSDEP="stub" # solaris.c when done
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
WM_OSDEP="stub"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AC_SUBST(WM_OSDEP)
|
||||||
|
|
||||||
|
|
||||||
dnl the prefix
|
dnl the prefix
|
||||||
dnl ==========
|
dnl ==========
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ wmaker_SOURCES = \
|
|||||||
menu.c \
|
menu.c \
|
||||||
menu.h \
|
menu.h \
|
||||||
misc.c \
|
misc.c \
|
||||||
osdep/linux.c \
|
osdep_@WM_OSDEP@.c \
|
||||||
monitor.c \
|
monitor.c \
|
||||||
motif.c \
|
motif.c \
|
||||||
motif.h \
|
motif.h \
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
#include <WINGs/WUtil.h>
|
|
||||||
#include "../wconfig.h"
|
|
||||||
|
|
||||||
Bool GetCommandForPid(int pid, char ***argv, int *argc)
|
|
||||||
{
|
|
||||||
*argv = NULL;
|
|
||||||
*argc = 0;
|
|
||||||
|
|
||||||
return False;
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <WINGs/WUtil.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* gcc -D{$os} -I ../../WINGs ${includes...} -Wall -Wextra -g -ggdb3 -c -o ${plat}.o ${plat}.c
|
|
||||||
* gcc -I ../../WINGs ${includes...} -g -ggdb3 -c -o test.o test.c
|
|
||||||
* gcc -g -ggdb3 -o test ${plat}.o ../../WINGs/.libs/libWUtil.a test.o
|
|
||||||
*
|
|
||||||
* $ ./test 1 2 'foo bar' "`date`" `date`
|
|
||||||
* arg[0] = [./test]
|
|
||||||
* arg[1] = [1]
|
|
||||||
* arg[2] = [2]
|
|
||||||
* arg[3] = [foo bar]
|
|
||||||
* arg[4] = [Sat Mar 20 18:36:22 CET 2010]
|
|
||||||
* arg[5] = [Sat]
|
|
||||||
* arg[6] = [Mar]
|
|
||||||
* arg[7] = [20]
|
|
||||||
* arg[8] = [18:36:22]
|
|
||||||
* arg[9] = [CET]
|
|
||||||
* arg[10] = [2010]
|
|
||||||
* $
|
|
||||||
*/
|
|
||||||
|
|
||||||
Bool GetCommandForPid(int pid, char ***argv, int *argc);
|
|
||||||
extern char *__progname;
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
|
|
||||||
char **nargv;
|
|
||||||
int i, nargc;
|
|
||||||
|
|
||||||
if (argc < 2) {
|
|
||||||
printf("Usage: %s arg arg arg ...\n", __progname);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GetCommandForPid(getpid(), &nargv, &nargc) == False) {
|
|
||||||
printf("GetCommandForPid() failed\n");
|
|
||||||
} else {
|
|
||||||
printf("nargv = %d\n", nargc);
|
|
||||||
for(i = 0; i < nargc; i++)
|
|
||||||
printf("arg[%d] = [%s]\n", i, nargv[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
|
|
||||||
#include "../wconfig.h"
|
#include "wconfig.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* copy argc and argv for an existing process identified by `pid'
|
* copy argc and argv for an existing process identified by `pid'
|
||||||
@@ -6,6 +6,10 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <WINGs/WUtil.h>
|
||||||
|
|
||||||
|
#include "wconfig.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* copy argc and argv for an existing process identified by `pid'
|
* copy argc and argv for an existing process identified by `pid'
|
||||||
* into suitable storage given in ***argv and *argc.
|
* into suitable storage given in ***argv and *argc.
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
|
|
||||||
#include "../wconfig.h"
|
#include "wconfig.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* copy argc and argv for an existing process identified by `pid'
|
* copy argc and argv for an existing process identified by `pid'
|
||||||
19
src/osdep_stub.c
Normal file
19
src/osdep_stub.c
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
#include <WINGs/WUtil.h>
|
||||||
|
|
||||||
|
#include "wconfig.h"
|
||||||
|
|
||||||
|
Bool GetCommandForPid(int pid, char ***argv, int *argc)
|
||||||
|
{
|
||||||
|
*argv = NULL;
|
||||||
|
*argc = 0;
|
||||||
|
static int notified = 0;
|
||||||
|
|
||||||
|
if (!notified) {
|
||||||
|
wwarning(_("%s is not implemented on this platform; "
|
||||||
|
"notify wmaker-dev@lists.windowmaker.info"), __FUNCTION__);
|
||||||
|
notified = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return False;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user