Possibly make compiling example programs easier from the outside - don't assume HAVE_CONFIG_H is defined but pick up values from the runtime version of that file. We also now run example programs as tests if they are built.

This commit is contained in:
R. Bernstein
2009-11-26 05:31:39 -05:00
parent 9bec7fc204
commit 35663d6266
42 changed files with 77 additions and 249 deletions

View File

@@ -1,7 +1,5 @@
/*
$Id: drives.cpp,v 1.6 2008/03/24 15:30:57 karl Exp $
Copyright (C) 2003, 2004, 2006, 2008 Rocky Bernstein <rocky@gnu.org>
Copyright (C) 2003, 2004, 2006, 2008, 2009 Rocky Bernstein <rocky@gnu.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,9 +17,10 @@
/* Simple program to show drivers installed and what the default
CD-ROM drive is and what CD drives are available. */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <cdio++/cdio.hpp>
#include <cdio/cd_types.h>
#include <cdio/logging.h>
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
@@ -31,9 +30,6 @@
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <cdio++/cdio.hpp>
#include <cdio/cd_types.h>
#include <cdio/logging.h>
static void
log_handler (cdio_log_level_t level, const char message[])