initial commit
Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT([libsample],[1.2.5],[vslavik@fastmail.fm])
|
||||
AC_CONFIG_SRCDIR([libsample.cpp])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl DEFINE CONFIGURE OPTIONS
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl define all the wx-config related options
|
||||
dnl (i.e. --with-wxdir, --with-wx-config, --with-wx-prefix, --with-wx-exec-prefix)
|
||||
WX_CONFIG_OPTIONS
|
||||
|
||||
dnl define all the wxpresets related options
|
||||
WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared])
|
||||
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CONFIGURE CHECKS
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl these checks are required by bakefile:
|
||||
AC_CANONICAL_SYSTEM
|
||||
AC_PROG_AWK
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
|
||||
dnl we want to always have DEBUG==WX_DEBUG
|
||||
WX_DEBUG=$DEBUG
|
||||
|
||||
dnl the following macros will search for the best matching wxWidgets build
|
||||
dnl (taking in count the values of the --enable-debug|unicode|shared and of
|
||||
dnl the --with-toolkit|wxshared options) and then set appropriately all the
|
||||
dnl WX_* options
|
||||
WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
|
||||
WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[core,base],[$WXCONFIG_FLAGS])
|
||||
WX_DETECT_STANDARD_OPTION_VALUES
|
||||
|
||||
dnl here all WX_* option values are available for your own processing...
|
||||
|
||||
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CONFIGURE END
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_BAKEFILE([m4_include(autoconf_inc.m4)])
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
|
||||
dnl show a nice summary of the chosen build settings to the user
|
||||
WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN
|
||||
WX_STANDARD_OPTIONS_SUMMARY_MSG_END
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<makefile>
|
||||
|
||||
<!-- a typical nice feature which wxpresets make available to wx-based programs
|
||||
is to allow the user to build with different configurations those programs;
|
||||
this is achieved in few fundamental steps:
|
||||
|
||||
1) set a different BUILDDIR for different build configurations
|
||||
2) set different output dirs for the libraries built with a
|
||||
different shared/static setting
|
||||
3) set different output names for the libraries built with
|
||||
different unicode/ansi and release/debug settings
|
||||
-->
|
||||
<include file="presets/wx.bkl"/>
|
||||
|
||||
<!-- the following line implements step #1: -->
|
||||
<set-wxlike-builddir/>
|
||||
|
||||
<!-- through the use of the 'wx-lib' and 'wxlike' templates, we'll get
|
||||
the ability to compile against any wxWidgets build using, for our
|
||||
program, the same configuration of the selected wxWidgets build.
|
||||
-->
|
||||
<template id="my" template="wx-lib,wxlike">
|
||||
<!-- wxlike-dirname implements step #2 (see initial comment) -->
|
||||
<wxlike-dirname>lib</wxlike-dirname>
|
||||
|
||||
<sources>libsample.cpp</sources>
|
||||
</template>
|
||||
|
||||
|
||||
<lib id="static" template="my" cond="WX_SHARED=='0'">
|
||||
<!-- wxlike-libname implements step #3 (see initial comment) -->
|
||||
<wxlike-libname prefix='sample'>test</wxlike-libname>
|
||||
</lib>
|
||||
|
||||
<dll id="shared" template="my" cond="WX_SHARED=='1'">
|
||||
<!-- wxlike-dllname does step #3 (see initial comment) -->
|
||||
<wxlike-dllname prefix='sample'>test</wxlike-dllname>
|
||||
<define>WXMAKINGDLL_LIBSAMPLE</define>
|
||||
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
</dll>
|
||||
|
||||
</makefile>
|
||||
@@ -0,0 +1,36 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: libsample.cpp
|
||||
// Purpose: The source of a dummy sample wx-based library
|
||||
// Author: Francesco Montorsi
|
||||
// Created: 26/11/06
|
||||
// Copyright: (c) Francesco Montorsi
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
|
||||
// for all others, include the necessary headers (this file is usually all you
|
||||
// need because it includes almost all "standard" wxWindows headers)
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
void MyUtilityFunction()
|
||||
{
|
||||
wxPrintf(wxT("Hello world!\n"));
|
||||
fflush(stdout);
|
||||
}
|
||||
Reference in New Issue
Block a user