2012-04-13 03:08:20 +02:00
|
|
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
2006-08-26 13:35:28 +02:00
|
|
|
//*************************************************************************
|
|
|
|
|
// DESCRIPTION: Verilator: Configure source; system configuration
|
|
|
|
|
//
|
2008-06-10 03:25:10 +02:00
|
|
|
// This file is part of Verilator.
|
2006-08-26 13:35:28 +02:00
|
|
|
//
|
2019-11-08 04:33:59 +01:00
|
|
|
// Code available from: https://verilator.org
|
2006-08-26 13:35:28 +02:00
|
|
|
//
|
|
|
|
|
//*************************************************************************
|
|
|
|
|
//
|
2019-01-04 01:17:22 +01:00
|
|
|
// Copyright 2003-2019 by Wilson Snyder. This program is free software; you can
|
2006-08-26 13:35:28 +02:00
|
|
|
// redistribute it and/or modify it under the terms of either the GNU
|
2009-05-04 23:07:57 +02:00
|
|
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
|
// Version 2.0.
|
2006-08-26 13:35:28 +02:00
|
|
|
//
|
|
|
|
|
// Verilator is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU General Public License for more details.
|
2008-06-10 03:25:10 +02:00
|
|
|
//
|
2006-08-26 13:35:28 +02:00
|
|
|
//*************************************************************************
|
2019-10-05 02:17:11 +02:00
|
|
|
|
2006-08-26 13:35:28 +02:00
|
|
|
//**********************************************************************
|
|
|
|
|
//**** Version and host name
|
|
|
|
|
|
2011-10-05 15:50:14 +02:00
|
|
|
// Autoconf substitutes this with the strings from AC_INIT.
|
|
|
|
|
#define PACKAGE_STRING ""
|
|
|
|
|
|
2017-10-10 13:18:01 +02:00
|
|
|
#define DTVERSION PACKAGE_STRING
|
2006-08-26 13:35:28 +02:00
|
|
|
|
|
|
|
|
//**********************************************************************
|
|
|
|
|
//**** Functions
|
2010-12-18 01:40:08 +01:00
|
|
|
|
2006-08-26 13:35:28 +02:00
|
|
|
//**********************************************************************
|
|
|
|
|
//**** Headers
|
2010-12-18 01:40:08 +01:00
|
|
|
|
2008-03-18 21:26:37 +01:00
|
|
|
//**********************************************************************
|
|
|
|
|
//**** Default environment
|
|
|
|
|
|
|
|
|
|
// Set defines to defaults for environment variables
|
|
|
|
|
// If set to "", this default is ignored and the user is expected
|
|
|
|
|
// to set them at Verilator runtime.
|
|
|
|
|
|
|
|
|
|
#ifndef DEFENV_SYSTEMC
|
|
|
|
|
# define DEFENV_SYSTEMC ""
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef DEFENV_SYSTEMC_ARCH
|
|
|
|
|
# define DEFENV_SYSTEMC_ARCH ""
|
|
|
|
|
#endif
|
2012-01-20 02:30:41 +01:00
|
|
|
#ifndef DEFENV_SYSTEMC_INCLUDE
|
|
|
|
|
# define DEFENV_SYSTEMC_INCLUDE ""
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef DEFENV_SYSTEMC_LIBDIR
|
|
|
|
|
# define DEFENV_SYSTEMC_LIBDIR ""
|
|
|
|
|
#endif
|
2008-03-18 21:26:37 +01:00
|
|
|
#ifndef DEFENV_VERILATOR_ROOT
|
|
|
|
|
# define DEFENV_VERILATOR_ROOT ""
|
|
|
|
|
#endif
|
|
|
|
|
|
2006-08-26 13:35:28 +02:00
|
|
|
//**********************************************************************
|
|
|
|
|
//**** Compile options
|
|
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include <iostream>
|
2008-05-28 21:58:18 +02:00
|
|
|
#include <cstdlib>
|
2008-06-30 19:11:25 +02:00
|
|
|
#include <cstdio>
|
2008-10-15 16:49:05 +02:00
|
|
|
#include <cstring>
|
2018-02-02 03:24:41 +01:00
|
|
|
#include <string>
|
|
|
|
|
#include <iostream>
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2018-02-02 03:24:41 +01:00
|
|
|
// Avoid needing std:: prefixes on some very common items
|
|
|
|
|
typedef std::string string;
|
|
|
|
|
using std::cout;
|
|
|
|
|
using std::endl;
|
|
|
|
|
using std::make_pair;
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2017-10-14 15:00:39 +02:00
|
|
|
//**********************************************************************
|
|
|
|
|
//**** Configure-discovered library options
|
|
|
|
|
|
|
|
|
|
// Define if struct stat has st_mtim.tv_nsec (from configure)
|
|
|
|
|
#undef HAVE_STAT_NSEC
|
|
|
|
|
|
2006-08-26 13:35:28 +02:00
|
|
|
//**********************************************************************
|
|
|
|
|
//**** OS and compiler specifics
|
|
|
|
|
|
|
|
|
|
#include "verilatedos.h"
|
2018-06-29 00:55:36 +02:00
|
|
|
|
|
|
|
|
//**********************************************************************
|
|
|
|
|
//**** This file sometimes gets truncated, so check in consumers
|
|
|
|
|
#define HAVE_CONFIG_BUILD
|