diff --git a/Makefile.am b/Makefile.am index 6f1da7c..7be8f5a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,14 +4,30 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config.h.in \ missing install-sh config.sub ltconfig \ ltmain.sh acinclude.m4 -SUBDIRS = jack - -EXTRA_PROGRAMS = jack_fltk_client jackrec +if HAVE_DOXYGEN +SUBDIRS = . jack doc +else +SUBDIRS = . jack doc +endif + +DIST_SUBDIRS = jack doc + +if HAVE_FLTK +FLTK_CLIENT = jack_fltk_client +else +FLTK_CLIENT = +endif + +if HAVE_SNDFILE +JACKREC = jackrec +else +JACKREC = +endif bin_PROGRAMS = jackd jack_simple_client jack_monitor_client \ - jack_impulse_grabber jack_connect jack_disconnect @XTRA@ + jack_impulse_grabber jack_connect jack_disconnect $(FLTK_CLIENT) $(JACKREC) -AM_CFLAGS = $(JACK_CFLAGS) -DADDON_DIR=\"$(ADDON_DIR)\" @GLIB_CFLAGS@ +AM_CFLAGS = $(JACK_CFLAGS) -DADDON_DIR=\"$(ADDON_DIR)\" $(GLIB_CFLAGS) AM_CXXFLAGS = $(JACK_CFLAGS) -DADDON_DIR=\"$(ADDON_DIR)\" @@ -35,13 +51,17 @@ jack_monitor_client_SOURCES = monitor_client.c jack_monitor_client_LDFLAGS = -ldl -lpthread jack_monitor_client_LDADD = libjack.la +if HAVE_FLTK jack_fltk_client_SOURCES = fltk_client.cc jack_fltk_client_LDFLAGS = -L/usr/X11R6/lib -lfltk -lX11 -lXext -ldl -lpthread jack_fltk_client_LDADD = libjack.la +endif +if HAVE_SNDFILE jackrec_SOURCES = capture_client.c jackrec_LDFLAGS = -lsndfile -ldl -lpthread jackrec_LDADD = libjack.la +endif jack_impulse_grabber_SOURCES = impulse_grabber.c jack_impulse_grabber_LDFLAGS = -ldl -lpthread -lm diff --git a/configure.in b/configure.in index 2dee1e0..5184fd2 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AC_CONFIG_AUX_DIR(.) JACK_MAJOR_VERSION=0 JACK_MINOR_VERSION=24 -JACK_MICRO_VERSION=0 +JACK_MICRO_VERSION=1 BETA= @@ -25,6 +25,8 @@ AM_INIT_AUTOMAKE(jack,${JACK_VERSION}) AC_PROG_CC AC_PROG_CXX +AC_PROG_LD +AM_PROG_LIBTOOL JACK_CFLAGS="-g -Wall -D_REENTRANT" JACK_OPT_CFLAGS="-D_REENTRANT -O6 -Wall -fomit-frame-pointer -ffast-math -fstrength-reduce -funroll-loops -fmove-all-movables" @@ -35,40 +37,57 @@ AC_ARG_ENABLE(optimize, AC_SUBST(JACK_CFLAGS) -XTRA="" +# plugins (just jack_alsa.so at the moment) go in the addon dir. -AC_ARG_ENABLE(fltk-client, - [ --enable-fltk-client build the FLTK test client.]) +ADDON_DIR=${libdir}/jack +AC_SUBST(ADDON_DIR) -if test "x$enable_fltk_client" != "xno" ; then - AC_CHECK_LIB(fltk,main, - [ XTRA="$XTRA jack_fltk_client" ], - [ AC_MSG_ERROR([*** you cannot build the FLTK client without the FLTK library])], - [ -L/usr/X11R6/lib -lX11 -lXext ]) -fi +# jack depends on alsa 0.9 and glib. some example apps depend on libsndfile and fltk. -AM_PATH_GLIB(1.0.0,,[AC_MSG_ERROR([*** JACK requires glib, but it does not appear to be installed])]) +AM_PATH_GLIB(1.0.0, + [:], + [AC_MSG_ERROR([*** JACK requires glib, but it does not appear to be installed])] +) AC_CHECK_LIB(asound,snd_pcm_drop, [:], [AC_MSG_ERROR([*** JACK currently requires ALSA (0.9.X) which you don't appear to have])] ) -AC_CHECK_LIB(sndfile,main, - [ XTRA="$XTRA jackrec" ], - [AC_MSG_WARN([*** the jackrec client will be skipped since you do not see to have libsndfile installed])] +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +AC_CHECK_LIB(fltk,main, + [AC_CHECK_HEADER(FL/Fl.H, + [HAVE_FLTK=true], + [HAVE_FLTK=false] + )], + [HAVE_FLTK=false], + [-L/usr/X11R6/lib -lX11 -lXext] ) +AC_LANG_RESTORE +if test $HAVE_FLTK = "false"; then + AC_MSG_WARN([*** no fltk found, the fltk example client will not be built]) +fi -AC_SUBST(XTRA) - -AC_PROG_LD -AM_PROG_LIBTOOL - -ADDON_DIR=${libdir}/jack - -AC_SUBST(ADDON_DIR) - -dnl check for the libraries we need +AC_CHECK_LIB(sndfile,main, + [AC_CHECK_HEADER(sndfile.h, + [HAVE_SNDFILE=true], + [HAVE_SNDFILE=false] + )], + [HAVE_SNDFILE=false] +) +if test $HAVE_SNDFILE = "false"; then + AC_MSG_WARN([*** no libsndfile found, the jackrec example client will not be built]) +fi + +# you need doxygen to make dist. +AC_CHECK_PROG(DOXYGEN, doxygen, + [HAVE_DOXYGEN=true], + [HAVE_DOXYGEN=false; AC_MSG_WARN([*** doxygen not found, docs will not be built])] +) -AC_OUTPUT(Makefile jack.pc jack/Makefile) +AM_CONDITIONAL(HAVE_FLTK, $HAVE_FLTK) +AM_CONDITIONAL(HAVE_SNDFILE, $HAVE_SNDFILE) +AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN) +AC_OUTPUT(Makefile jack.pc jack/Makefile doc/Makefile doc/reference.doxygen) diff --git a/doc/.cvsignore b/doc/.cvsignore index 3432c3f..5e5009d 100644 --- a/doc/.cvsignore +++ b/doc/.cvsignore @@ -1,2 +1 @@ -*.html - +*.stamp\nreference.doxygen\nreference diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index 6b440c6..0000000 --- a/doc/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -WEBSITE = ardour.sourceforge.net - -HTML-FILES := index.html \ - issues.html \ - manual.html \ - features.html \ - mailinglist.html \ - contributors.html \ - intro.html \ - download.html \ - index.html \ - news.html \ - links.html \ - requirements.html \ - configuring.html \ - helping.html \ - compiling.html \ - todo.html - -user = $(shell whoami) -fullname = $(shell awk -F: '/$(user)/ { print $$5}' /etc/passwd) - -%.html: %.m4 header.html trailer.html - m4 -P -E -I. $< > $@ - sed -e "s/@LASTMOD@/`date`/" -e "s/@USER@/$(fullname)/" \ - < $@ > $@.XXX && mv $@.XXX $@ - -.PHONY: manual -.PHONY: upload - -all: html -install: - @: - -html: $(HTML-FILES) - -upload: build-updir - cd updir ; \ - if [ "`ls`" ] ; then \ - (echo "cd /home/groups/j/ja/jackit/htdocs && tar -zxvf - ; exit"; tar cf - *.html | gzip) | \ - ssh \$(user)@shell.sourceforge.net; \ - cd .. ; \ - touch last-upload ; \ - fi - -upload-images: build-updir - (echo "cd /home/groups/j/ja/jackit/htdocs && tar -zxvf - ; exit"; tar cf - *.png | gzip) | \ - ssh \$(user)@shell.sourceforge.net; \ - -build-updir: - if [ ! -d updir ] ; then mkdir updir ; else rm -rf updir/* ; fi ; \ - if [ ! -f last-upload ] ; then touch --date="Jan 1 00:00:01 EST 1970" last-upload; fi ; \ - uptime=`ls -l --full-time last-upload | awk '{printf ("%s %s %s %s %s\n", $$6, $$7, $$8, $$9, $$10)}'`; \ - tar -chf - --newer="$$uptime" \ - --exclude=updir \ - --exclude="*.m4" \ - --exclude=Makefile \ - --exclude=CVS \ - --exclude=manual \ - --exclude=header.html \ - --exclude=trailer.html \ - --exclude=last-upload . | (cd updir; tar xf - ) ; \ - -clean: - rm -f $(HTML-FILES) - diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..b7c22af --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,66 @@ +## Process this file with automake to produce Makefile.in + +DOX=reference.doxygen + +EXTRA_DIST= + +DOC_STAMPS=html-build.stamp + +DOC_DIR=$(datadir)/doc/jack + +all-local: doxygen-build.stamp + +doxygen-build.stamp: $(DOX) + @echo '*** Running doxygen ***' + doxygen $(DOX) + touch doxygen-build.stamp + +clean-local: + rm -f *~ *.bak $(DOC_STAMPS) || true + +distclean-local: clean + rm -f *.stamp || true + if test -d reference; then rm -rf reference; fi + +install-data-local: + $(mkinstalldirs) $(DOC_DIR)/reference/html + (installfiles=`echo reference/html/*.html`; \ + if test "$$installfiles" = 'reference/html/*.html'; \ + then echo '-- Nothing to install' ; \ + else \ + for i in $$installfiles reference/html/doxygen.gif reference/html/doxygen.css; do \ + echo '-- Installing '$$i ; \ + $(INSTALL_DATA) $$i $(DOC_DIR)/reference/html; \ + done; \ + fi) + +# we need doxygen stuff built so we can know what to uninstall +uninstall-local: doxygen-build.stamp + (installfiles=`echo reference/html/*.html`; \ + if test "$$installfiles" = 'reference/html/*.html'; \ + then echo '-- Nothing to uninstall' ; \ + else \ + for i in $$installfiles reference/html/doxygen.gif reference/html/doxygen.css; do \ + echo '-- Unstalling '$$i ; \ + rm $(DOC_DIR)/$$i; \ + done; \ + fi) + +# +# Require doxygen when making dist +# +if HAVE_DOXYGEN +dist-check-doxygen: +else +dist-check-doxygen: + @echo "*** doxygen must be installed and enabled in order to make dist" + @false +endif + +dist-hook: dist-hook-local dist-check-doxygen + mkdir $(distdir)/reference + mkdir $(distdir)/reference/html + -cp reference/html/*.html reference/html/*.css \ + reference/html/*.gif $(distdir)/reference/html + +.PHONY : dist-hook-local diff --git a/doc/compiling.m4 b/doc/compiling.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/compiling.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/configuring.m4 b/doc/configuring.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/configuring.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/contributors.m4 b/doc/contributors.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/contributors.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/download.m4 b/doc/download.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/download.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/faq.m4 b/doc/faq.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/faq.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/features.m4 b/doc/features.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/features.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/header.html b/doc/header.html deleted file mode 100644 index 1a5482a..0000000 --- a/doc/header.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - Ardour - - - - - - - - - - -
- - -JACK audio connection kit -

- - -

-

-

-

-Web: http://jackit.sourceforge.net/
-Email: (MEMBER-ONLY) jackit@lists.sourceforge.net -

-
- -
- - diff --git a/doc/helping.m4 b/doc/helping.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/helping.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/index.m4 b/doc/index.m4 deleted file mode 100644 index 32d14e6..0000000 --- a/doc/index.m4 +++ /dev/null @@ -1,7 +0,0 @@ - - -m4_include(`header.html') - -

About JACK

- -m4_include(`trailer.html') diff --git a/doc/intro.m4 b/doc/intro.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/intro.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/issues.m4 b/doc/issues.m4 deleted file mode 100644 index c4080d4..0000000 --- a/doc/issues.m4 +++ /dev/null @@ -1,85 +0,0 @@ - - -m4_include(`header.html') - -

Issues to consider when porting programs to JACK

- -

Sample bit width assumptions

- -A lot existing Linux audio software tends to assume that audio samples -are 8 or 16 bits wide, and uses short to store them. This -does not work with JACK, where all sample data, regardless of the -original data format in which it was obtained (e.g. from disk), is -stored as a floating point value normalized to the range -1.0 to +1.0. - -

Channel interleaving assumptions

- -Almost all existing Linux audio software assumes that when delivering -a sample stream with more than one channel, the samples should be -interleaved. This does not work with JACK, where all sample streams -are mono. - -

Block-on-write or block-on-read assumptions

- -Quite a lot of existing Linux audio software tends to be structured -around the blocking behaviour of a call to write(2) or read(2) when -the file descriptor concerned refers to the audio interface. They -often have this structure: - - - - // Playback - - while (1) { - get_sample_date_from_somewhere (buf); - write (audiofd, buf, bufsize); - } - - // Capture - - while (1) { - read (audiofd, buf, bufsize); - put_sample_data_somewhere (buf); - } - - - -These structures don't work with JACK, which is entirely callback -driven and moves audio data by copying it to and from memory -locations, not files. Instead, its necessary to define a -process() callback which does this: - - - - // playback - - int - process (nframes_t nframes) - { - get_nframes_of_data_from_somewhere_without_blocking (buf); - sample_t *addr = jack_port_get_buffer (playback_port); - memcpy (addr, buf, nframes * sizeof (sample_t)); - } - - // capture - - int - process (nframes_t nframes) - { - sample_t *addr = jack_port_get_buffer (capture_port); - memcpy (buf, addr, nframes * sizeof (sample_t)); - put_nframes_of_data_somewhere_without_blocking (buf); - } - - - -The code in the process() function should not under -(almost) any circumstances block: that is, it may not read/write data -from/to a file, it may not call malloc(), it may not use -pthread_mutex_lock(), and it should generally avoid system calls. the -process() callback will be executed when the JACK server -decides it should be, and it cannot be used to time other parts of the -program. - -m4_include(`trailer.html') - diff --git a/doc/links.m4 b/doc/links.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/links.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/mailinglist.m4 b/doc/mailinglist.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/mailinglist.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/manual.m4 b/doc/manual.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/manual.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/news.m4 b/doc/news.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/news.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/jack.dox b/doc/reference.doxygen.in similarity index 99% rename from jack.dox rename to doc/reference.doxygen.in index 62cb50c..5626d2c 100644 --- a/jack.dox +++ b/doc/reference.doxygen.in @@ -23,7 +23,7 @@ PROJECT_NAME = Jack # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.20.5 +PROJECT_NUMBER = @JACK_VERSION@ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -301,7 +301,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = jack/jack.h +INPUT = @top_srcdir@/jack/jack.h # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp @@ -567,13 +567,13 @@ LATEX_HEADER = # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. -PDF_HYPERLINKS = NO +PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. -USE_PDFLATEX = NO +USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep @@ -779,7 +779,7 @@ PERL_PATH = /usr/bin/perl # option is superceded by the HAVE_DOT option below. This is only a fallback. It is # recommended to install and use dot, since it yield more powerful graphs. -CLASS_DIAGRAMS = YES +CLASS_DIAGRAMS = NO # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization diff --git a/doc/requirements.m4 b/doc/requirements.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/requirements.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/todo.m4 b/doc/todo.m4 deleted file mode 100644 index c1525b3..0000000 --- a/doc/todo.m4 +++ /dev/null @@ -1,4 +0,0 @@ - - -m4_include(`header.html') -m4_include(`trailer.html') diff --git a/doc/trailer.html b/doc/trailer.html deleted file mode 100644 index f447800..0000000 --- a/doc/trailer.html +++ /dev/null @@ -1,23 +0,0 @@ - - -

-
-
- -Last modified: @LASTMOD@ by @USER@ -
[Best Viewed with Any Browser] -
-

- -
- - -
- - - - - - -