Commit f2cf4e42 authored by Mathieu L Bouchard's avatar Mathieu L Bouchard
Browse files

introducing --enable-qt, QTGUI makefile var, #define QTGUI, -qtcanvas, sys_qtcanvas.

parent a0d0374d
......@@ -10,6 +10,7 @@ AC_SUBST(portmidi, no)
AC_SUBST(binarymode, -m755)
AC_SUBST(fftw, no)
AC_SUBST(tk, yes)
AC_SUBST(qt, yes)
AC_SUBST(PDLIB)
AC_SUBST(CPPFLAGS)
AC_SUBST(MORECFLAGS)
......@@ -51,6 +52,8 @@ AC_ARG_ENABLE(fat, [ --disable-fat build fat binary on Mac OS X]
fat=$enableval, fat="yes")
AC_ARG_ENABLE(tk, [ --disable-tk build without tcl/tk-GUI],
tk=$enableval)
AC_ARG_ENABLE(qt, [ --enable-qt build with Qt (not implemented)],
qt=$enableval)
dnl Checks for programs.
AC_PROG_CC
......@@ -452,6 +455,14 @@ AC_TRY_LINK( [
fi
## }JMZ: end of large-file support section
if test x$qt != "xno"; then
dnl Some kind of AC_CHECK_HEADER should go here.
dnl Some kind of AC_CHECK_LIB should go here.
CPPFLAGS=$CPPFLAGS" -DQTGUI"
fi
if test -d ../obj
then echo -n
else mkdir ../obj
......
......@@ -46,6 +46,8 @@ ARCH_CFLAGS = -DPD
CFLAGS = @CFLAGS@ $(ARCH_CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(MORECFLAGS)
QTGUI = @qt@
# the sources
SYSSRC += @SYSSRC@
......
......@@ -13,8 +13,6 @@
#include <fcntl.h>
#include <stdlib.h>
#define UNISTD
#ifdef UNISTD
#include <unistd.h>
#endif
......@@ -54,6 +52,11 @@ int sys_console = 0; /* default settings for the console is off */
int sys_k12_mode = 0; /* by default k12 mode is off */
int sys_unique = 0; /* by default off, prevents multiple instances
of pd-l2ork */
#ifdef QTGUI
int sys_qtcanvas = 0; /* enable Qt */
#endif
char *sys_guicmd;
t_symbol *sys_libdir;
t_symbol *sys_guidir;
......@@ -447,7 +450,7 @@ static char *(usagemessage[]) = {
};
#ifdef QTGUI
// -nogui applies only to Tk until further notice.
// -nogui applies only to Tk.
// -qtcanvas should open a Qt window for every pd canvas (two toolkits at once)
// more options could go here, to enable a Qt main window, menus, dialogues.
// those are transitory options, until Tk is removed, at which point
......@@ -476,6 +479,7 @@ static void sys_parsedevlist(int *np, int *vecp, int max, char *str)
*np = n;
}
/*
static int sys_getmultidevchannels(int n, int *devlist)
{
int sum = 0;
......@@ -484,6 +488,7 @@ static int sys_getmultidevchannels(int n, int *devlist)
while(n--)sum+=*devlist++;
return sum;
}
*/
/* this routine tries to figure out where to find the auxilliary files
......@@ -871,6 +876,13 @@ int sys_argparse(int argc, char **argv)
sys_guicmd = argv[1];
argc -= 2; argv += 2;
}
#ifdef QTGUI
else if (!strcmp(*argv, "-qtcanvas"))
{
sys_qtcanvas = 1;
argc--; argv++;
}
#endif
else if (!strcmp(*argv, "-send") && argc > 1)
{
sys_messagelist = namelist_append(sys_messagelist, argv[1], 1);
......
......@@ -47,6 +47,9 @@ extern int sys_verbose;
extern int sys_noloadbang;
extern int sys_nogui;
extern char *sys_guicmd;
#ifdef QTGUI
extern int sys_qtcanvas;
#endif
EXTERN int sys_nearestfontsize(int fontsize);
EXTERN int sys_hostfontsize(int fontsize);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment