--- a/Makefile.am
+++ b/Makefile.am
@@ -2,8 +2,6 @@
 
 SUBDIRS = doc
 
-AUTOMAKE_OPTIONS = ansi2knr
-
 bin_PROGRAMS = cdcd
 man_MANS = cdcd.1
 
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(cdcd.c)
+AC_INIT(cdcd, 0.6.6)
 
 MAJOR_VERSION=0
 MINOR_VERSION=6
@@ -8,29 +8,22 @@
 PACKAGE=cdcd
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
 
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AM_INIT_AUTOMAKE
 AM_CONFIG_HEADER(config.h)
-AM_MAINTAINER_MODE
 
 dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_CPP
-AM_C_PROTOTYPES
 AC_CANONICAL_HOST
 
 dnl Checks for libraries.
-AC_CHECK_LIB(curses, tputs,,
-             [AC_MSG_ERROR([cannot find the curses library.
-Check the INSTALL file, maybe you can find how to solve the problem.])])
 AC_CHECK_LIB(readline, rl_completion_matches,,
-             [AC_MSG_ERROR([cannot find GNU libreadline 4.2 or higher.
-Check the INSTALL file, maybe you can find how to solve the problem.])])
+             [AC_MSG_ERROR([cannot find GNU libreadline 4.2 or higher.])])
 AC_CHECK_LIB(socket, socket)dnl Needed for Solaris 2.9.
 
-AM_PATH_LIBCDAUDIO(,,[AC_MSG_ERROR([cannot find libcdaudio.
-Check the INSTALL file, maybe you can find how to solve the problem.])])
+AM_PATH_LIBCDAUDIO(,,[AC_MSG_ERROR([cannot find libcdaudio.])])
 
 have_libcdaudio=0
 have_cdaudio=0
@@ -40,6 +33,11 @@
     default_device=/dev/unspecified
     have_libcdaudio=1
     ;;
+   
+  *freebsd[567]*)
+    default_device=/dev/cd0
+    have_cdaudio=1
+    ;;
 
   *bsd*)
     default_device=/dev/wcd0a
@@ -69,8 +67,8 @@
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_FUNC_ALLOCA
-AC_CHECK_HEADERS([string.h strings.h sys/ptyvar.h])
-AC_CHECK_HEADERS([errno.h locale.h malloc.h stdlib.h \
+AC_CHECK_HEADERS([string.h strings.h sys/ptyvar.h malloc.h])
+AC_CHECK_HEADERS([errno.h locale.h stdlib.h \
 readline/readline.h readline/history.h sys/socket.h unistd.h],, \
 [AC_MSG_ERROR([missing header file.])])
 
