]> Repos - portaudio/commitdiff
Added an autoconf-based configure/make system -DMM
authordmazzoni <dmazzoni@0f58301d-fd10-0410-b4af-bbb618454e57>
Mon, 15 Jul 2002 00:36:04 +0000 (00:36 +0000)
committerdmazzoni <dmazzoni@0f58301d-fd10-0410-b4af-bbb618454e57>
Mon, 15 Jul 2002 00:36:04 +0000 (00:36 +0000)
Makefile.in [new file with mode: 0644]
config.guess [new file with mode: 0755]
config.sub [new file with mode: 0755]
configure [new file with mode: 0755]
configure.in [new file with mode: 0644]
install-sh [new file with mode: 0755]

diff --git a/Makefile.in b/Makefile.in
new file mode 100644 (file)
index 0000000..6b47156
--- /dev/null
@@ -0,0 +1,93 @@
+#
+# PortAudio Makefile.in
+#
+# Dominic Mazzoni
+#
+
+CC = @CC@
+CFLAGS = @CFLAGS@ -Ipa_common
+LIBS = @LIBS@
+AR = @AR@
+RANLIB = @RANLIB@
+INSTALL = @INSTALL@
+PREFIX = @prefix@
+
+OTHER_OBJS = @OTHER_OBJS@
+
+PALIB = libportaudio.a
+PADLL = libportaudio.so
+PADLLV = libportaudio.so.0.0.18
+PAINC = pa_common/portaudio.h
+
+COMMON_OBJS = \
+       pa_common/pa_convert.o \
+       pa_common/pa_lib.o
+
+TESTS = \
+       bin/patest_buffer \
+       bin/patest_clip \
+       bin/patest_dither \
+       bin/patest_hang \
+       bin/patest_latency \
+       bin/patest_leftright \
+       bin/patest_longsine \
+       bin/patest_many \
+       bin/patest_maxsines \
+       bin/patest_multi_sine \
+       bin/patest_pink \
+       bin/patest_record \
+       bin/patest_ringmix \
+       bin/patest_saw \
+       bin/patest_sine8 \
+       bin/patest_sine \
+       bin/patest_sine_formats \
+       bin/patest_sine_time \
+       bin/patest_stop \
+       bin/patest_sync \
+       bin/patest_toomanysines \
+       bin/patest_underflow \
+       bin/patest_wire
+
+OBJS = $(COMMON_OBJS) $(OTHER_OBJS)
+
+all: lib/$(PALIB) lib/$(PADLLV) tests
+
+tests: bin/ $(TESTS)
+
+lib/$(PALIB): lib/ $(OBJS) Makefile $(PAINC)
+       $(AR) ruv lib/$(PALIB) $(OBJS)
+       $(RANLIB) lib/$(PALIB)
+
+lib/$(PADLLV): lib/ $(OBJS) Makefile $(PAINC)
+       $(CC) -shared -o lib/$(PADLLV) $(OBJS)
+
+$(TESTS): bin/%: lib/$(PALIB) Makefile $(PAINC) pa_tests/%.c
+       $(CC) -o $@ $(CFLAGS) pa_tests/$*.c lib/$(PALIB) $(LIBS)
+
+install: lib/$(PALIB) lib/$(PADLLV)
+       $(INSTALL) -m 644 lib/$(PALIB) $(PREFIX)/lib/$(PADLLV)
+       $(INSTALL) -m 644 lib/$(PALIB) $(PREFIX)/lib/$(PALIB)
+       cd $(PREFIX)/lib && rm -f $(PADLL) && ln -s $(PADLLV) $(PADLL)
+       $(INSTALL) -m 644 pa_common/portaudio.h $(PREFIX)/include/portaudio.h
+       @echo ""
+       @echo "------------------------------------------------------------"
+       @echo "PortAudio was successfully installed."
+       @echo ""
+       @echo "On some systems (e.g. Linux) you should run 'ldconfig' now"
+       @echo "to make the shared object available.  You may also need to"
+       @echo "modify your LD_LIBRARY_PATH environment variable to include"
+       @echo "the directory $(PREFIX)/lib"
+       @echo "------------------------------------------------------------"
+       @echo ""
+
+clean:
+       rm -f $(OBJS) $(TESTS) lib/$(PALIB)
+
+%.o: %.c Makefile $(PAINC)
+       $(CC) -c $(CFLAGS) $< -o $@
+
+bin:
+       mkdir bin
+
+lib:
+       mkdir lib
diff --git a/config.guess b/config.guess
new file mode 100755 (executable)
index 0000000..297e5c3
Binary files /dev/null and b/config.guess differ
diff --git a/config.sub b/config.sub
new file mode 100755 (executable)
index 0000000..791bcde
Binary files /dev/null and b/config.sub differ
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..a06d81d
Binary files /dev/null and b/configure differ
diff --git a/configure.in b/configure.in
new file mode 100644 (file)
index 0000000..5abd189
--- /dev/null
@@ -0,0 +1,55 @@
+dnl
+dnl PortAudio configure.in script
+dnl
+dnl Dominic Mazzoni
+dnl
+
+dnl Require autoconf >= 2.13
+AC_PREREQ(2.13)
+
+dnl Init autoconf and make sure configure is being called
+dnl from the right directory
+AC_INIT([pa_common/portaudio.h])
+
+dnl Checks for programs
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_PROG_INSTALL
+AC_PATH_PROG(AR, ar, no)
+if [[ $AR = "no" ]] ; then
+   AC_MSG_ERROR("Could not find ar - needed to create a library");
+fi
+
+dnl Extra variables we want to substitute
+AC_SUBST(OTHER_OBJS)
+TARGETS="tests"
+
+dnl Determine the host operating system / platform
+AC_CANONICAL_HOST
+
+case "${host_os}" in
+  darwin* )
+       dnl Mac OS X configuration
+
+       OTHER_OBJS="pa_mac_core/pa_mac_core.o";
+       LIBS="-lm";
+       ;;
+
+  *)
+       dnl Unix OSS configuration
+
+   AC_CHECK_LIB(pthread, pthread_create,
+                ,
+                AC_MSG_ERROR([libpthread not found!]))
+
+       OTHER_OBJS="pa_unix_oss/pa_unix_oss.o";
+       LIBS="-lm -lpthread";
+esac
+
+AC_OUTPUT([Makefile])
+
+echo ""
+echo "Finished configure."
+
+echo ""
+echo "Type 'make' to build PortAudio and examples."
diff --git a/install-sh b/install-sh
new file mode 100755 (executable)
index 0000000..e9de238
Binary files /dev/null and b/install-sh differ