]> git.alsa-project.org Git - alsa-tools.git/commitdiff
Updated to use GNU autoconf/automake.
authorJaroslav Kysela <perex@perex.cz>
Mon, 20 Aug 2001 13:18:40 +0000 (13:18 +0000)
committerJaroslav Kysela <perex@perex.cz>
Mon, 20 Aug 2001 13:18:40 +0000 (13:18 +0000)
seq/sbiload/Makefile [deleted file]
seq/sbiload/Makefile.am [new file with mode: 0644]
seq/sbiload/configure.in [new file with mode: 0644]
seq/sbiload/cvscompile [new file with mode: 0644]
seq/sbiload/make.conf [deleted file]
seq/sbiload/sbiload.c

diff --git a/seq/sbiload/Makefile b/seq/sbiload/Makefile
deleted file mode 100644 (file)
index 2121d1a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-TOP = .
-include $(TOP)/make.conf
-
-CFLAGS = $(COPTS) $(INCLUDES)
-LIBS = $(ASOUND)
-
-OBJS = sbiload.o
-
-
-# Build all the targets.
-#
-all: $(OBJS)
-       $(CC) -o sbiload $(CFLAGS) $(OBJS) $(LIBS)
-       
-install: all
-       $(INSTALL) sbiload $(INSTDIR)
-
-# Remove all object files and exectutables
-#
-clean:
-       rm -f sbiload $(OBJS) core a.out
-
-# Remove all generated and built files.
-#
-clobber: clean
-
-sbiload.o : sbiload.c
diff --git a/seq/sbiload/Makefile.am b/seq/sbiload/Makefile.am
new file mode 100644 (file)
index 0000000..9ea6d65
--- /dev/null
@@ -0,0 +1,11 @@
+# # Process this file with automake to produce Makefile.in.
+AUTOMAKE_OPTIONS = 1.3 foreign
+
+CFLAGS = -Wall -g
+
+bin_PROGRAMS = sbiload
+#man_MANS = sbiload.1
+
+sbiload_SOURCES = sbiload.c
+
+EXTRA_DIST = README COPYING
diff --git a/seq/sbiload/configure.in b/seq/sbiload/configure.in
new file mode 100644 (file)
index 0000000..f0dc206
--- /dev/null
@@ -0,0 +1,10 @@
+AC_INIT(sbiload.c)
+AM_INIT_AUTOMAKE(sbiload, 0.3.0)
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_HEADER_STDC
+AM_PATH_ALSA(0.9.0)
+CFLAGS="$CFLAGS $ALSA_FLAGS"
+LDFLAGS="$LDFLAGS $ALSA_LIBS"
+
+AC_OUTPUT(Makefile)
diff --git a/seq/sbiload/cvscompile b/seq/sbiload/cvscompile
new file mode 100644 (file)
index 0000000..01e8151
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+if test "x$AUTOMAKE_DIR" = "x"; then
+  if test -d /usr/local/share/automake; then
+    AUTOMAKE_DIR=/usr/local/share/automake
+  fi
+  if test -d /usr/share/automake; then
+    AUTOMAKE_DIR="/usr/share/automake"
+  fi
+fi
+
+for f in install-sh mkinstalldirs missing; do
+  cp -av $AUTOMAKE_DIR/$f .
+done
+
+aclocal $ACLOCAL_FLAGS
+automake --foreign --add-missing
+autoconf
+export CFLAGS='-O2 -Wall -pipe -g'
+echo "CFLAGS=$CFLAGS"
+echo "./configure $@"
+./configure $@
+unset CFLAGS
+make
diff --git a/seq/sbiload/make.conf b/seq/sbiload/make.conf
deleted file mode 100644 (file)
index 2ac8af7..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-# Options required by the C compiler
-COPTS = -O2 -g
-
-# Path to include files
-INCLUDES = -I .
-
-# Options to link with alsa sound library
-ASOUND = -lasound
-
-# Installation options
-INSTALL = install -s
-INSTDIR = /usr/local/bin
index 8327dc38c1bb9d98035fa2c4a3ec313adc9bc780..0886cf2123795d8b1be33beee6f6c30a6f28e1e2 100644 (file)
@@ -81,6 +81,7 @@ static struct option long_opts[] = {
   {"opl3", 0, NULL, '4'},
   {"list", 0, NULL, 'l'},
   {"verbose", HAS_ARG, NULL, 'v'},
+  {"version", 0, NULL, 'V'},
   {0, 0, 0, 0},
 };
 
@@ -130,7 +131,7 @@ error_handler (const char *file, int line, const char *function, int err, const
 static void
 show_list () {
   snd_seq_client_info_t *cinfo;
-  int client, port, err;
+  int client, err;
 
   snd_lib_error_set_handler (error_handler);
   if ((err = snd_seq_open (&seq_handle, "hw", SND_SEQ_OPEN_DUPLEX, 0)) < 0) {
@@ -175,6 +176,7 @@ show_usage () {
     "  -4              - four operators file type (default = two ops)",
     "  -l              - List possible output ports that could be used",
     "  -v level        - Verbose level (default = 0)",
+    "  -V              - Show version",
   };
 
   for (cpp = msg; cpp < msg + NELEM (msg); cpp++) {
@@ -182,6 +184,14 @@ show_usage () {
   }
 }
 
+/*
+ * Show version
+ */
+static void
+show_version () {
+  printf("Version: " VERSION "\n");
+}
+
 /*
  * Show instrument FM operators
  */
@@ -448,8 +458,7 @@ parse_portdesc (char *portdesc) {
   char *astr;
   char *cp;
   int a[ADDR_PARTS];
-  int count, naddr;
-  int i;
+  int count;
 
   if (portdesc == NULL)
     return -1;
@@ -578,6 +587,9 @@ main (int argc, char **argv) {
     case 'v':
       verbose = atoi (optarg);
       break;
+    case 'V':
+      show_version();
+      exit (1);
     case 'l':
       show_list ();
       exit (0);