• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

doc/H07-May-2022-2,1771,977

example/H03-May-2022-2,2221,295

m4/H10-Jan-2011-7,9887,160

src/H03-May-2022-5,2153,330

tests/H10-Jan-2011-1,8581,329

AUTHORSH A D10-Jan-20112.2 KiB2724

COPYINGH A D10-Apr-200924.7 KiB483400

ChangeLogH A D10-Jan-20118.2 KiB153133

INSTALLH A D10-Apr-20097.7 KiB183143

Makefile.amH A D06-Nov-20101 KiB3125

Makefile.inH A D03-May-202222.4 KiB709626

READMEH A D06-Nov-20107.7 KiB210152

aclocal.m4H A D10-Jan-201132.4 KiB897804

argtable2-uninstalled.pc.inH A D10-Jan-2011183 85

argtable2.pc.inH A D10-Jan-2011250 139

config.guessH A D10-Apr-200942.8 KiB1,4661,268

config.subH A D10-Apr-200930.8 KiB1,5701,429

configureH A D10-Jan-2011385.8 KiB13,36210,403

configure.acH A D10-Jan-20112.2 KiB7564

depcompH A D10-Apr-200913.5 KiB480304

install-shH A D10-Apr-20097 KiB295169

ltmain.shH A D10-Jan-2011237.8 KiB8,4146,482

missingH A D10-Apr-200910 KiB337263

mkinstalldirsH A D10-Apr-20091.9 KiB11285

README

1Installing argtable2 on Unix systems
2------------------------------------
3The basic compile and install procedure for unix systems is:
4
5    $ cd argtable2-x
6    $ ./configure
7    $ make
8    $ make check (optional)
9    $ sudo make install
10    $ make clean
11
12Remember to update your system's LD_LIBRARY_PATH to include
13the location of the dynamic library (normally /usr/local/lib/).
14
15The configuration script will install argtable into /usr/local/
16by default. To install into a different directory, specify
17that directory path when you run configure, as in
18
19    $ ./configure --prefix=~fred/mystuff
20
21See install.txt for a detailed description of the configure script.
22
23OS X notes:
24    1) Mac OS X uses DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH.
25
26DJGPP notes:
27    1) DJGPP users may need to specify the compiler name at configure
28       time, as in
29            $ ./configure CC=gcc.exe
30
31
32
33Installing argtable2 on DOS/Windows systems
34-------------------------------------------
35To build argtable.lib:
36
37    > cd src
38    > nmake -f Makefile.nmake
39
40Then copy the argtable2.h, argtable2.lib, argtable2.dll, impargtable2.lib
41files to wherever you choose.
42
43To build the example programs:
44
45    > cd example
46    > nmake -f Makefile.nmake
47
48Notes:
49   1) The arg_rex and arg_date command line argument types are not supported
50      under Microsoft Windows because the Microsoft compilers do not provide
51      the necessary regex.h and strptime() functions.
52
53   2) Watcom compilers may have trouble building the DLL version of the library,
54      giving an error like this:
55      Error! E3033: file _2FK.AAA: line(15): directive error near 'Files\dm\lib'
56      To workaround this, edit line 34 of src/Makefile.nmake and remove the
57      "/def:argtable2.def" from the linker stanza
58
59      line 33:      argtable2.dll: $(OBJS)
60      line 34:          link /DLL /OUT:$@ $** /IMPLIB:impargtable2.lib
61
62
63
64Installing argtable2 on DOS/Windows systems with date and regex support
65-----------------------------------------------------------------------
66These instructions are provided by Paolo Bormida <paolo.bormida@fastwebnet.it>
67
681) Install MINGW and MSYS (these instructions are based on those tools).
692) Install a regular expression library such as the TRE library from
70   http://www.laurikari.net/tre.
713) Install GnuWin32 LibGW32C (GlibC Windows port) from
72   http://gnuwin32.sourceforge.net/packages/libgw32c.htm
734a) Unpack LibGW32C and TRE in a folder of your choice.
744b) Unpack argtable2 in a folder of your choice and (optional) create a
75    "build" folder under it.
765) Run MSYS shell
776) Move into argtable root folder (if you created a "build" folder move into it)
78   with CD
797) Run argtable2 "configure" script with the following command line
80   configure --prefix=<argtable root folder>
81   CPPFLAGS="-I<tre root folder>/include/tre -idirafter <gw32c folder>/include/glibc"
82   LDFLAGS="-L<tre root folder>/lib -L<gw32c/lib"
83   LIBS="-ltre -lgw32c"
84
85   N.B If you created a "build" folder in step 4b run "../configure" instead ;-)
86
87   You will get a makefile to build argtable with (good) support for regular
88   expressions and (poor) support for date arguments. The problem is that the
89   strptime implementation in LibGW32C is rather poor, does not take locale into
90   account (at least so it seems to me by looking at the code)
91
92
93
94Cross-compiling argtable2 for Windows from Linux
95------------------------------------------------
96You can crosscompile argtable2 on Linux with Win32-platforms as target
97using mingw32. However, as with native Windows compilers, the arg_rex
98and arg_date command line argument types are not supported by mingw32
99because it currently offers no regex.h nor strptime() functions.
100
101The following procedure was tested on a Debian "Sid" install with the
102mingw32 default packages installed.
103
1041) Make sure, you have the mingw32-crosscompiler installed. There are
105   precompiled packages for several distributions available. You can
106   get the sources from http://www.mingw.org/
107
1082) Set the apropriate environment variables:
109
110        $ export PATH=/path/to/your/mingw/bin:$PATH
111
112   Usually the path is something like
113       /usr/i586-mingw32/i586-mingw32/bin
114   or
115       /usr/local/i586-mingw32/bin
116
117   Sometimes it helps to set also the COMPILER_PATH environment
118   variable to your mingw-binary-path.
119
1203) Run configure:
121
122        $ cd argtable2-x
123        $ ./configure --build=i586-linux --host=i586-mingw32msvc \
124                 --target=i586-mingw32msvc \
125                 --prefix=/path/to/install
126
127   You most certainly want to give a different prefix than the default
128   one. The resulting lib will not be useable by your usual ELF-loader.
129
130   See argtable's INSTALL file for further configure options.
131
1324) Build and install argtable2:
133
134        $ make
135        $ make install
136
137Please note, that this creates a static library (libargtable2.a) and a
138shared one (libargtable2.so), which you link to your object code in the
139usual way (-L/path/to/prefix/lib -largtable2 -I/path/to/prefix/include).
140Building of DLLs is currently not supported, but may be done by hand.
141A .def-file is already included in the src/ directory.
142
143
144
145Modifying the (Unix) Makefiles
146------------------------------
147The Makefiles are automatically generated from the Makefile.am templates
148using automake-1.9 and libtool (ensure both of these tools are installed).
149You must run automake-1.9 from the root node of the source tree after
150modifying any of the Makefile.am files for your changes to take effect.
151
152       $ cd argtable2-x
153       $ automake-1.9
154       $ ./configure
155       $ make
156
157
158
159Using PKG-CONFIG with autoconf
160------------------------------
161These instructions were provided by Michael Brown who added support for
162pkg-config in argtable2-12.
163
164The 'pkg-config' utility can be used to automatically find CFLAGS and
165LDFLAGS for external modules, such as argtable, when building other
166modules against it. It integrates nicely into autoconf so that if
167your application needs the flags for argtable, you can simply declare
168
169    PKG_CHECK_MODULES([ARGTABLE2], [argtable2])
170
171and autoconf will set two vars for you, namely ARGTABLE2_LIBS and
172ARGTABLE2_CFLAGS. Typically, _LIBS would be "-largtable2" plus any
173library search path dirs that may be needed, "-L/path/". And _CFLAGS
174would be any preprocessor defines that are needed, for example,
175include paths, "-I/path/".
176
177There are several benefits. Firstly, developers do not need to hardcode
178cflags/ldflags in every makefile for libs that use argtable. Secondly,
179changes to the argtable cflags/ldflags can be distributed via the
180pkg-config files without users having to update their makefiles. Lastly.
181and perhaps most importantly, it makes it very easy to build argtable
182in a non-standard location and still compile other things against it.
183
184Here is an example
185
186    $ pwd
187    /home/michael_e_brown/hapi/git/argtable2-11
188
189    $ PKG_CONFIG_PATH=$PWD pkg-config argtable2 --libs
190    -L/home/michael_e_brown/hapi/git/argtable2-11/src/.libs -largtable2
191
192    $ PKG_CONFIG_PATH=$PWD pkg-config argtable2 --cflags
193    -I/home/michael_e_brown/hapi/git/argtable2-11/src
194
195I have not installed argtable on my box, but I can easily compile
196other programs against it. In this example, pkg-config is looking in
197the argtable2-uninstalled.pc that is dropped in the top dir by
198configure in argtable2. When you install it, argtable2.pc is installed
199in $(libdir)/pkgconfig, which is on the normal pkg-config search path.
200So, I dont have to change any of my scripts or makefiles no matter
201where argtable is located.
202
203
204Building argtable using CMake
205-----------------------------
206Rob Zaborowski has provided CMakeLists.txt files for argtable that
207allow CMake users to create a custom build project for argtable
208for virtually any operating system. See http://www.cmake.org for
209more about the CMake tool.
210