|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| doc/ | H | 07-May-2022 | - | 2,177 | 1,977 |
| example/ | H | 03-May-2022 | - | 2,222 | 1,295 |
| m4/ | H | 10-Jan-2011 | - | 7,988 | 7,160 |
| src/ | H | 03-May-2022 | - | 5,215 | 3,330 |
| tests/ | H | 10-Jan-2011 | - | 1,858 | 1,329 |
| AUTHORS | H A D | 10-Jan-2011 | 2.2 KiB | 27 | 24 |
| COPYING | H A D | 10-Apr-2009 | 24.7 KiB | 483 | 400 |
| ChangeLog | H A D | 10-Jan-2011 | 8.2 KiB | 153 | 133 |
| INSTALL | H A D | 10-Apr-2009 | 7.7 KiB | 183 | 143 |
| Makefile.am | H A D | 06-Nov-2010 | 1 KiB | 31 | 25 |
| Makefile.in | H A D | 03-May-2022 | 22.4 KiB | 709 | 626 |
| README | H A D | 06-Nov-2010 | 7.7 KiB | 210 | 152 |
| aclocal.m4 | H A D | 10-Jan-2011 | 32.4 KiB | 897 | 804 |
| argtable2-uninstalled.pc.in | H A D | 10-Jan-2011 | 183 | 8 | 5 |
| argtable2.pc.in | H A D | 10-Jan-2011 | 250 | 13 | 9 |
| config.guess | H A D | 10-Apr-2009 | 42.8 KiB | 1,466 | 1,268 |
| config.sub | H A D | 10-Apr-2009 | 30.8 KiB | 1,570 | 1,429 |
| configure | H A D | 10-Jan-2011 | 385.8 KiB | 13,362 | 10,403 |
| configure.ac | H A D | 10-Jan-2011 | 2.2 KiB | 75 | 64 |
| depcomp | H A D | 10-Apr-2009 | 13.5 KiB | 480 | 304 |
| install-sh | H A D | 10-Apr-2009 | 7 KiB | 295 | 169 |
| ltmain.sh | H A D | 10-Jan-2011 | 237.8 KiB | 8,414 | 6,482 |
| missing | H A D | 10-Apr-2009 | 10 KiB | 337 | 263 |
| mkinstalldirs | H A D | 10-Apr-2009 | 1.9 KiB | 112 | 85 |
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