diff --git a/pd/src/configure.in b/pd/src/configure.in index b378e0761bbc1026c3b06e28024fd7f4857d9916..edc36d78e57f84cbaaed95e4fe682a0fc543cf33 100644 --- a/pd/src/configure.in +++ b/pd/src/configure.in @@ -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 diff --git a/pd/src/makefile.in b/pd/src/makefile.in index e42b6c996598ed590b7e747a22c25889c86a631c..f2e39f567b141c21bc54ec794817f1615bc1ecf7 100644 --- a/pd/src/makefile.in +++ b/pd/src/makefile.in @@ -46,6 +46,8 @@ ARCH_CFLAGS = -DPD CFLAGS = @CFLAGS@ $(ARCH_CFLAGS) $(WARN_CFLAGS) $(CPPFLAGS) $(MORECFLAGS) +QTGUI = @qt@ + # the sources SYSSRC += @SYSSRC@ diff --git a/pd/src/s_main.c b/pd/src/s_main.c index b53a1ab9fa38257cde62d8269fd22eda621a9a2d..8b95328019b7e49db882a7d3a7c59adfbdd17297 100644 --- a/pd/src/s_main.c +++ b/pd/src/s_main.c @@ -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); diff --git a/pd/src/s_stuff.h b/pd/src/s_stuff.h index 565af95f5994311906f6cab6468beaba21bcfd80..862b2a44ce81a9f880fefd2404fbf94149b2aece 100644 --- a/pd/src/s_stuff.h +++ b/pd/src/s_stuff.h @@ -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);